Open Libra: An open platform for financial inclusion - <AUTHOR> https://www.openlibra.io/ <comment><USER2> The value in libra isn't in some novel technical concept. From what I have seen they made some ugly trade-offs to make the whole thing scale, invented their own not-state-of-the-art BFT algorithm and invented a new programming language for smart contracts that looks a bit saner than the EVM stuff.

The real selling point is the partnership with major payment services, CC companies etc. If it succeeds you might be able to pay with libra at every POS terminal and that would be huge. If the base layer is as permissionless as advertised that could even be used to build proxies that allow Bitcoin payments at every POS terminal.

The second interesting idea is the monetary basket backing it. That would take some control out of government's hands and would discourage overly reckless money printing since people would have a damn easy way of both detecting it (e.g. looking at the Libra/€ price) and opting out (buying Libra). If all big fiat currencies aren't stable enough even gold or BTC could be chosen as a backing asset.

If OpenLibra can't replicate this they have a totally worthless project, not much different from all the other altcoins out there.

<comment><USER3> Linking to a monetary basked is another idea borrowed from economics that is based on the less than accurate understanding there of how monetary systems actually work.

I suspect the reason other financial companies are withdrawing is that they´ve looked at the practical implications.

<comment><USER4> > Linking to a monetary basked is another idea borrowed from economics that is > based on the less than accurate understanding there of how monetary systems > actually work.

What do you mean? That's essentially how index-fund ETFs work. Is there a reason you think it's not suitable for a currency?

</comment></comment></comment><comment><USER5> A bit off topic, in the list people are from "Singapore University". Which Singapore university are they referring to. Singapore has several universities none of them is named just "Singapore University"

<comment><USER6> SUTD (I googled the names, took two seconds)

<comment><USER5> Yes googling the names provide the info, my point was more on the website. Saying just "Singapore University" could imply more prestigious university like National University of Singapore, which is not the case here.

</comment></comment></comment><comment><USER7> So you're going to build Libra and market it under the same name with "Open" tacked on the front? Sounds like obvious trademark infringement. I'll bet they get a cease and desist before the week's over.

It's like selling hamburgers and fries at OpenMcDonalds. How is that not super confusing to the public?

</comment><comment><USER8> Cryptocurrency community likes to label and market every fork, every iteration of these coins as a brand new innovation and celebrate so early.

Even I have zero sympathy for Facebook, their credibility on building tech is incomparable to this sort of opportunist movements.

</comment><comment><AUTHOR> Here some pictures[1][2] at devcon5.

\- [1] [https://twitter.com/lrettig/status/1181771915557367808](https://twitter.com/lrettig/status/1181771915557367808)

\- [2] [https://twitter.com/santisiri/status/1181771115749728256](https://twitter.com/santisiri/status/1181771115749728256)

<comment><USER9> The first reply to tweet #1 is

> Imagine how good this would be if Lucas hadn't already exitscammed from his > previous project in 2018?

Can somebody shed some light on that?

<comment><USER10> Another tweet below talks about ICOs [https://twitter.com/alee/status/1181784770902016000](https://twitter.com/alee/status/1181784770902016000)

" My friends and I invested $1M in Lucas' @wirelineio ICO in 2018

I haven't heard from Lucas Geiger in months

Lots of false promises made by their advisor @zaoyang \- such as @JUN_Omise would lead their marketing, @ethereumecf would be their investor "

<comment><USER11> I've never heard of Wireline before, but looking at the above tweet and a quick glance at their website ([https://www.wireline.io](https://www.wireline.io)) makes this whole thing smell like a team of amateurs running a scam. Why anyone would think it would be a good idea to dump a million USD into any ICO is beyond me.

<comment><USER12> hey hey it was me :)

1\. they promised this would be ethereum community fund's first ever investment 2\. they promised q2 2018 token release guidance 3\. they promised jun hasegawa would mentor Lucas Geiger to lead a huge marketing campaign 4\. they promised other investors were in the round: golem, augur, matt mullenweg, wendell davis, david lee (refactor), dhvc, hashed, qtum and others are investors. i never confirmed if they really were all invested, but this is what was marketed to me

<comment><USER12> since then - i simply cannot reach lucas geiger or the advisor sizhao, who was the creator of farmville and has a ton of followers on twitter for thought leader type posts. sizhao said he invested in wireline, but now the company denies he ever did. he has since blocked me and doesn't respond

<comment><USER13> Pretty good demonstration of why at least SOME regulation of the ICO space is a good idea.

<comment><USER12> again i take full responsibility for the losses. i invested with the selfish motive of making a return, for my personal benefit, and it didn't go as planned.

however, they did falsely market the investment to me and that is something i do feel is illegal and not okay

absolutely they're under the jurisdiction of the SEC as they took money from US citizens

<comment><USER14> For what it's worth, I'll take a tenth of the funding and promise to deliver just as much.

<comment><USER12> lol i don't doubt you

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER15> a open platform for financial inclusion is running successfully for a decade now. It's OSS and you know the name already

</comment><comment><USER16> It's a nice marketing twist, Libra but not managed by Facebook. Not sure that will be enough though.

Looming at the repo this is implemented in Rust, along with Libra itself. Nice to see Rust being used on a big oroject like this.

<comment><USER17> Facebook's implementation of Libra used Rust too.

<comment><USER18> Factually correct. not sure why this is being downvoted.

[https://github.com/libra/libra/blob/master/Cargo.toml](https://github.com/libra/libra/blob/master/Cargo.toml)

<comment><USER19> > Looming at the repo this is implemented in Rust, _along with Libra itself._

It seems to be just repeating something from the comment it's a reply to (though it is worded unusually, so I may have misunderstood in the opposite direction).

</comment></comment></comment></comment><comment><USER20> I'd rather see a state like California try to create their own crypto, make it mandatory that brick/mortar stores accept it, and add some FDIC type protection layer and then figure out a way to bake in guaranteed basic income. That would be world-changing.

It would need some centralization to ensure gamers don't double dip and get 2x benefits from the dole.

There have been a gazillion discussions on how to ensure single identity in a coin that has basic income baked into it, and as far as I can tell nobody has a good solution, some web of trust protocols are promising but still way early in being useful.

I think the only way GBI will ever work though is via some sort of crypto, waiting for the governments to enact anything will probably fail, and crypto being electronic it drives cost down even more (no printing of checks required - all automated).

<comment><USER21> The thing is that the _mechanics_ of how to implement a cryptocurrency are changing rapidly, and the most common cryptocurrencies still have major technological flaws, and I'd hate to see a state enshrine those flaws into law.

Proof-of-work has a bunch of issues surrounding electricity usage, transaction scalability, and latency. It's not acceptable for a commonly-used currency to take 11 minutes to confirm transactions, nor is it acceptable for it to use more electricity than Ireland to do so. There's a bunch of research on fixing this, from various proof-of-stake systems to new consensus protocols to Nano's precomputed proof-of-work to Iota's tangle. But none of them have the track record that Bitcoin does, nor do we know if they're secure under concerted attack, nor do we know whether they'll lead to eventual centralization of power and the ability of a few actors to rewrite the ledger. I'd like to see more experimentation in this space and some actual usage with special-purpose applications before it gets rolled out by fiat across the world.

The other thing I'd really like to see is automated central banking. I don't buy the "you never need a central bank; let's just have a deflationary currency!" arguments, but at the same time central banks have a lot of problems with measurement, fairness, and incentives. I'd love to see the whole institution replaced by a computer that automatically maintains stable prices by giving money to everyone to expand the money supply and sucking it out (taxation?) to contract it, which was Milton Friedman's original idea when he came up with monetarism. To my knowledge nobody's really building this, though, and it requires solving some thorny problems in how exactly you measure price levels.

<comment><USER20> that would be a pretty cool concept, but then you have to trust the banking authority, if all money is electronic, of course if you're not a criminal and if we don't have china-like social network in place it may be fine.

I think this could work, if all are taxed then all will feel more equal, the system could maybe funnel a little more $$ at the lower echelons of society than the upper's -- maybe have it simply raise networth's to some arbitrary minimum... make sure everyone has at least 1k in the bank at all times for instance to cover rent regardless of socio-economic factors.

We'd need to do away w/ cash though, or people could game the system by just withdrawing it all to appear 'poor'.

</comment></comment></comment><comment><USER22> >> the most respected blockchains technologies such as Ethereum, Cosmos, Wireline, and Radicle / Oscoin.

The most outstanding thing about Etherium was the owner jumping the ship with the millions of real paper dollars. Him and the light coin guy. Now that was really impressive.

<comment><USER23> Wait, I remember the lite coin guy cashing out. Did Vitalik do the same thing?

</comment></comment><comment><USER24> >>Surveillance finance. One's ability to engage financially (e.g. borrow in Libra) will potentially be determined by their social graph and online activity.

Say what?

</comment><comment><USER25> It's called Bitcoin.

</comment><comment><USER26> How are they going to maintain the peg without the resources of Facebook/Paypal/Visa etc.?

If they won't then it doesn't really compete with what Libra aspires to be.

</comment><comment><USER27> I fear someone not smart enough to think of "Libre Libra" instead, might not be smart enough to get it done

</comment><comment><USER28> I don't recognize any of these team members as having made any substantive contributions to major areas in blockchain security or scaling; Having raised a lot of money in funding is not relevant experience here; Nor is building a few side-chains and inefficiently linking them together.

Reading between the lines here: the real message seems to be that a bunch of opportunist nobodies decided to get together to exploit Libras public image for their own benefit. It's the same pattern I've seen done many times over the years. "Hey, these people are really evil for being so wealthy. We of course secretly want to be wealthy too but we're totally different to they are." Then when you reach your goal you become the new "villain" for someone else and the cycle repeats.

Blockchain companies love to paint themselves as the hero. Completely outside the reach of regular politics or capitalistic desires. It's even been a popular launch tactic for a while now. Dark wallet did it to great effect; And every iteration of dark web market has done it since; You can even see it in the 'us' vs 'them' mentality inherent in most "decentralized" system design. Only, here the architects are the main influences and not the regulators... But lets be honest here: this group shouldn't be trusted any more than a normal, profit-seeking company. And I see no reason to believe this team could deliver a more secure or scalable cryptocurrency than any that already exists.

Tl; dr, gimme money and prestige plz.

<comment><USER13> Interestingly, the list of team members appear to have vanished from the homepage.

</comment></comment><comment><USER29> I thought we already had a ton of "open platforms for financial inclusion". They are called "cryptocurrencies". Like Bitcoin, Ethereum, Monero, Litecoin, etc.

</comment><comment><USER30> (XLM) Stellar is an existing alternative.

</comment><comment><USER31> What problem does Libra solve? What problem does this project solve better?

<comment><USER32> Facebook wants money, this makes them money faster than their other business.

</comment></comment><comment><USER33> If you want to present yourself as an alternative for FB's libra, this is way too cheap. Even the worst alt coins have a better website and more info.

> Our core team and community

I mean, how can anyone take this serious? The core team could easily be just 1 person in the list. And the 'community', are that some far relatives who said "yeah good idea!"?

The website is made within an hour or so, writing the text has taken longer for sure. This is a scam. Just some smart guys trying to launch and cash in on an alt coin that is a made up solution for FB's libra coin.

<comment><USER34> oh come on, the repository linked to from "contribute to our codebase" has one contributor and four commits!! ;-)

<comment><USER35> don't forget "follow our progress" -> link to twitter -> "Open Libra hasn't twitted yet". I wonder what are all those names listed on the website.

</comment></comment></comment><comment><USER36> No Thanks.

</comment><comment><USER37> troll? fb will sue the shit out of this project just because of the name :D

</comment><comment><USER38> Plot twist, releasing this was the plan all along and Facebook's failure was just marketing.

</comment><comment><USER39> Meditate on who you want to control our financial future or create the first real one world currency. I sure as hell choose Zuckerberg dead last. I would rather a Kim Jung oom ffs. I will support Open Libra and anything that goes against Facebook</comment>


An iOS application to track your XMR pool&wallet stats - <AUTHOR> https://itunes.apple.com/us/app/cryptonote-pool-stats/id1254418236?ls=1&mt=8 <comment><AUTHOR> Waiting for your feature requests and feedbacks.</comment>


Complex numbers have never been so intuitive to me - <AUTHOR> http://betterexplained.com/articles/a-visual-intuitive-guide-to-imaginary-numbers/ <comment> T-hawk Wow, I _got_ this too.

Here's my followup question and answer. We know i is the square root of -1, but what is the square root of _-i_ ? I've always thought that you'd need another dimension to describe that, and another dimension for the square root of _that_ unit, and so on.

But no. (Let's tackle sqrt(i) as a simpler case first.) We can answer sqrt(i) in terms of rotation as described in the article. i is a rotation from the unit vector by 90°, so applying that twice turns 1 into -1. What operation applied twice would result in i? This just clicked: a 45° rotation. Thus the unit vector at a 45° angle is the square root of i: 0.5√2 + 0.5√2 * i.

The mathematical approach bears that out. Follow the rules of complex number arithmetic to square 0.5√2 + 0.5√2 * i (multiply it by itself) and you do indeed get i.

And we can solve sqrt(-i) the same way. -i is a 270° rotation from the unit vector 1. So the square root of -i is a 135° rotation, or -0.5√2 + 0.5√2 * i.

Finally, a 270° rotation is equivalent to a -90° rotation. So -45° should also be a square root of -i, and indeed it is. Multiplying 0.5√2 + -0.5√2 * i by itself also gives you -i. We've arrived back at the axiom that all numbers have two square roots of opposite signs. 135° and -45° are the same vector pointing in exactly opposite directions.

Last question: What's the _cube_ root of i? Easy: a 30° rotation. The 30° unit vector is 0.5√3 + 0.5i, and cubing that does indeed get you i.

</comment><comment><USER2> So real numbers are 1-dimensional, and complex numbers are 2-dimensional. Going along the same lines, we also have Quaternions, 4-dimensional numbers: <http://en.wikipedia.org/wiki/Quaternion> Further again we have 8-dimensional Octonions, and 16-dimensional Sedenions.

I'm curious as to why we don't have any useful numbers for the non-power-of-2 dimensions. E.g. 3-dimensional numbers.

<comment><USER3> I wonder why mathematicians use this funny i-notation? You could write complex numbers as vectors, e.g. 2+3i <=> (2,3). Of course, it is more terse to write i instead of (0,1) and this seems to matter a lot to mathematicians.

<comment><USER4> I think it'd be awesome to have some sort of "decimal" notation where 2 + 3i was encapsulated as a single entity, something like 2_3. We don't write 2 + .3 when we mean 2.3, and this distinction makes it seem like a complex number is "less put together" than a real one.

<comment><USER5> in a sense it is - it involves magnitudes along two orthogonal directions. there is no qualitative difference between 2 and 0.3 in this particular context.

</comment></comment></comment></comment><comment><USER6> "It's a testament to our mental potential that today's children are expected to understand ideas that once confounded ancient mathematicians."

Ex-fucking-actly. Math is hard. Compsci is hard. But if it _remains_ hard, then we adults have failed to do our job.

<comment><USER4> Yes -- things are hard, now, because we don't have the right models. Multiplication is hard when you're working with Roman numerals. Is it a problem with multiplication, or our thinking?

What's funny is that we think it stops there. "Oh, we made made multiplication easy, and negatives, and decimals, but Calculus... well that needs to remain difficult forever and ever.".

</comment></comment><comment><USER7> This is a fantastic explanation. I've always had trouble "getting" imaginary numbers.... even though I've had to use the fairly often as an Electrical Engineer. This is the first time they've made intuitive sense to me.

<comment><USER8> ^Same here, I have taken countless tests using imaginary numbers, but it never went beyond a really pointless exercise in my mind. _Now_ I get it.

<comment><USER9> It's a shame I paid for all that college and knowing this would have greatly expanded my understanding of a lot of what I learned in my math classes.

EDIT: I guess I learned it in high school though, and the math teacher probably didn't know this either.

Point being, everyone should come across this at some point. It would be beneficial to many math students.

</comment></comment></comment><comment><USER10> In the same vein, you can have split-complex numbers which represent the 2d hyperbolic plane. Also, there are the 4-dimensional generalizations like quaternions, split-quaternions or other related algebra systems.

What's amazing about these systems is that there is usually an Euler relation that holds. Example: e^(i*t) = cosh(t) + sinh(t) for the split-complex.

</comment><comment><USER11> i wish someone had explained this to me about 15 years ago. i had sought, and settled on the unsatisfying explanation that it is a conventional notation with useful ways to do coordinate geometry. non essential, but a way of doing it. though i have looked at euler's identity with awe, it's mostly been a mystical sort of awe.

I hate to admit it but i had started using a line of argument to certain theist friends, that if god helps you, as a concept, no need to be bothered, think no more of it than a concept such as the the mathematical concept of i, its a number that does not exist but has real consequences. now I feel stupid for doubting the existence of i.

I keep trying to relearn my fundamentals, and this article does that beautifully. i would otherwise have died a disbeliever.

<comment><AUTHOR> > though i have looked at euler's identity with awe, it's mostly been a > mystical sort of awe.

betterexplained also has a _fantastic_ visual explanation of euler's identity: [http://betterexplained.com/articles/intuitive- understanding-...](http://betterexplained.com/articles/intuitive- understanding-of-eulers-formula/)

<comment><USER4> Thanks so much for helping share this! :)

My goal is to get all these concepts out of awe (which I had too) into a real sense of "Ah, I get it!". It doesn't help anyone to memorize incantations.

Two other insights I love:

* e as continuous growth: [http://betterexplained.com/articles/an-intuitive-guide-to-ex...](http://betterexplained.com/articles/an-intuitive-guide-to-exponential-functions-e/) * radians as the perspective of the mover: [http://betterexplained.com/articles/intuitive-guide-to-angle...](http://betterexplained.com/articles/intuitive-guide-to-angles-degrees-and-radians/)

I realized that I didn't _really_ get what e and radians were about -- I memorized them, but I wasn't comfortable. Once you have the right analogies, Euler's formula starts making sense (without resorting to "Oh, take the Taylor series expansion of each and see how they match up", which is essentially an incantation).

<comment><AUTHOR> No problem, I'm happy to share something that genuinely helped me. I love what you're doing, please keep doing it :)

</comment></comment></comment></comment><comment><USER12> Wow. I feel like if I had been taught this before trigonometry, high school would have been a breeze.

<comment><USER13> It was for me. But then, I had a good maths tutor. Ironically, I cannot recall his name. But the lessons he taught stayed with me, so at least he's remembered for something.

</comment></comment><comment><USER14> If you'd like some sexy French graphics to accompany that, there's a good Dimensions episode devoted to imaginary numbers. I found it on YouTube at

<http://www.youtube.com/watch?v=egIPnwcJuZ8>

But the main website is

<http://www.dimensions-math.org/Dim_download_E.htm>

And I think it's chapter 5.

</comment><comment><USER15> Given a complex number a + bi, the square root of a^2 + b^2 is called the norm. The norm shouldn't be thought of as a measure of the "size" of a complex number, since complex numbers are not well-ordered. It makes little sense to say that 2 + 3i is equal to 3 + 2i.

<comment><USER16> Why wouldn't you be able to call it size? Equal size doesn't imply equality elsewhere in mathematics or elsewhere in the world (Jimmy and Paul are the same height, so they must be the same person?).

<comment><USER15> Two people of equal height aren't the same person, so it would be odd for an article to claim that the way to convert a person to a real number would be to simply measure their height, and even odder to call that the "size" of a person.

</comment></comment></comment><comment><USER17> It's unfortunate that our schools in general haven't been able to convey with as much clarity and passion this concept. I suspect that any passion or enthusiasm for a subject quickly gets destroyed when it's turned into a job (particularly a job in a system run by bureaucrats).

This is why I am excited about programs like Khan Academy. One of the things he's been able to do that has eluded most public schooling is explain a concept simply, and with enthusiasm.

</comment><comment><USER18> Why do I feel like my teachers intentionally made math harder than it needed to be? Some concepts just lend themselves to simple visual representations and just never seem to be taught that way...

<comment><USER19> Very often, teachers don't understand the concepts very well either.

<comment><USER4> Exactly. And ironically, we expect that to be the norm. "Oh, nobody gets imaginary numbers, let's just memorize it and move on."

To me, that's a _huge_ canary in the coal mine! Why aren't we stopping here and making sure we get it? It's like reading a sentence, not understanding the key vocabulary word, and moving on. Yes, you "read" it but did you get anything from it?</comment></comment></comment>


California May Go Dark This Summer, and Most Aren't Ready - <AUTHOR> https://www.bloomberg.com/news/articles/2019-05-12/california-may-go-dark-this-summer-and-most-aren-t-ready <comment><USER2> Would it do any good to put those transmission lines underground for the most part?

<comment><USER3> That would make them safe until the next earthquake, which is probably a lot better than "until the coming summer" but you never know.

Digging is expensive though.

At home a similar problem is solved by having someone walk along the cables every few months, clearing undergrowth and felling trees as necessary. Also expensive, but the electricity network is reliable (and and as a side effect, so is the supply of Christmas trees).</comment></comment>


The dramatic decline of the Philadelphia Inquirer newsroom captured in photos - <AUTHOR> http://paidcontent.org/2013/04/20/the-dramatic-decline-of-the-philadelphia-inquirer-newsroom-captured-in-photos/ <comment><USER2> What are the implications of so few people producing MSM? Increased error, deceit? A large workforce with a range of personalities and beliefs would better provide checks and balances.</comment>


Nvidia Is Manually Reviewing RTX 3080 Orders to Stop Scalpers - <AUTHOR> https://www.pcmag.com/news/nvidia-is-manually-reviewing-rtx-3080-orders-to-stop-scalpers <comment><USER2> I looked at the specs of 3080 and I cannot understand, why it such a hype?

What games do not work on 2080Ti or even 1080Ti?

And from a Deep Learning perspective 3080 does not look that great. 10Gb of GPU ram is a big problem.</comment>


Go maps in action - <AUTHOR> http://blog.golang.org/2013/02/go-maps-in-action.html <comment><USER2> I don't really get it. It's a hash. Big deal.

I know what a hash is. Wow, Go has hashes. Yeah, I knew that too.

 _blinks_ So... yeah. I mean, it's the Go blog, so cool. Blog about things in the language, but in terms of 'interesting things about Go' or 'interesting things about tech I expect to see on hacker news frontpage' this is pretty much a 0 for me...

<comment><USER3> So an article titled "Go maps in action" is about Go maps and... you're underwhelmed? Dissatisfied? This is an article for people who want to learn about Go maps. I'm not sure what you expected.

You would be surprised how valuable these kinds of "entry level" articles are. I get more grateful mail about the basic articles than I do the advanced ones, because the audience is so much wider.

So, not for you I guess.

<comment><USER4> reminds me of people defending reposts on reddit.

Yeah I've never seen it three minutes ago on frontpage, so the repost is OK for me and people like me.

Maps in Go is definitely a good lesson for hackers who doesn't know about maps...

</comment></comment></comment><comment><USER5> The fact that slices cannot be used as keys in maps was, for me, a fairly big turn off.

<comment><USER6> Using a slice as a key doesn't make much sense; a slice is a fundamentally- mutable view onto an underlying array, which itself may be mutable.

Quick testing shows that you _can_ use arrays:

        func main() {
            a := [4]int{1,2,3,4}
            m := make(map[[4]int]string)
            m[a] = "Hello"
            fmt.Println(m[[4]int{1,2,3,4}])
        }

Although that will be klunky, since the size of the array is in the type of the array. And still mutable. Mutating keys is bad.

In all my years of using maps, I can't think of when I wanted to index by something that was truly an arbitrary-length array of things. If you want to index by something like a tuple of things, declare a datatype for that purpose. What exactly are you trying to do by using a slice as a key?

<comment><USER5> I was lazy when I complained about not be able to use slices as keys, I guess I really meant to complain that there is no arbitrary-length immutable sequence type that I can use as keys to a map (other than strings, which are sequences of characters and are allowed as keys to a map).

For an example where you might want to do this consider storing a count of the frequency with which different words follow a given n-gram (sequence of n words) in some corpus, the sort of thing you'd need to make a Markov chain nonsense text generator (like the example programs in chapter 3 of The Practice of Programming: <http://cm.bell-labs.com/cm/cs/tpop/code.html>).

Of course, you can always take your immutable sequences and represent them as strings, as other languages such as Perl, Awk and Lua force you to do. But I really like that I'm not forced to use such kludges in, say, Python or Haskell.

<comment><USER7> A map is a hash table. I'm confused as to why you don't use either a custom hashing function or your own custom datatype that organizes your data according to the sequence order of your key. While a generic hashing function that can operate on any type of data could be implemented in the language, I believe the flexibility of defining the hashing function yourself is perfectly acceptable considering the performance implications of having a universal hash function. The reason why is this: The table lookup should fundamentally be roughly an O(1) operation _after_ hashing your key value. A universal hashing function that operates on arbitrary-length immutable sequences would likely be an additional O(n) (where n is the length of the sequence) complexity built into the map structure. I don't believe that's acceptable from a language standpoint.

<comment><USER8> There's nothing stopping you writing your own hash map that can be configured with a custom hash function.

The builtin map is limited to types for which the language defines ==. It's a simplifying trade-off; I don't think "acceptable" versus "unacceptable" enters into it. One could imagine expanding the builtin map type to support a hash function, and that was something that was considered early on, but it added complexity that just wasn't needed most of the time.

</comment></comment></comment></comment></comment><comment><USER9> Very helpful, thanks for posting this! The parts about map declaration vs. make() vs. new() are the most valuable tidbits, I think. A lot of the rest is mostly just very handy tips and pointers.

</comment><comment><USER10> Go everyday, but still going.</comment>


25 Years of PHP - <AUTHOR> https://www.jetbrains.com/lp/php-25/ <comment><USER3> I wrote _a lot_ of PHP from 1999-2008. First as a hobby, then professionally. From 20 LOC guestbooks to payment gateways used to process millions in payments. It wasn't until recently that I was sure I'd written more code in any other language than PHP. These days I'll occasionally poke around with it or patch a bug, but that's about it.

Is it a perfect language? No. But which language is? (I can hear the Lisp crowd grumbling.) It's fast. The only ceremony you need to write executable code is the <?php tag. It has a very rich standard library -- even if some of the function names make me want to stab people.

My only real gripe with PHP is the annotation syntax. Yikes. Stuff that's in comments _SHOULD NOT AFFECT RUNNING CODE_. Who came up with that?

PHP has taken a lot of flack over the years. Mostly from people who never really worked with it. A lot of the criticism really should have been aimed at certain PHP developers, rather than the language or the community at large. PHP's low entry barrier is a blessing, it's how a lot of developers were introduced to programming. It's also a curse, because a lot of very inexperienced programmers managed to become prolific at getting code out there, code which was ugly, bug infested and a security nightmare. But it's not fair to attack a language over its inexperienced users.

<comment><USER4> While I agree that PHP does have pros as well as cons, I find it disconcerting that I've read MANY assertions here on HN, that PHP detractors just haven't used it very much or are mostly complaining about things like bad standard library function names.

I've used PHP in earnest. It and JavaScript are tied for worst programming languages I've used. JavaScript gets more of a "pass" from me because I'm just not a dynamic-typing fan and I'll admit that it might be less awful for someone who enjoys/prefers Python or Ruby or whatever.

PHP, on the other hand, is basically just worse-Java. And Java isn't a great language, either. The built-in PHP array is a constant source of frustration. Keys are sometimes strings, sometimes ints. And you don't always know which it is! This makes working with the array_* functions cumbersome at best. The fact that you can't typehint everywhere also sucks. No generics sucks. No threads sucks. No (real) async sucks. Globals suck (including different language behavior based on a config file on your machine...........).

It's just not a strong language. And I'm super-tired of hearing "it's not the tool, it's the user." There _is_ such a thing as a shitty tool. And just because some human somewhere CAN write working code in Brainfuck, does NOT mean that anybody SHOULD. I'm similarly tired of "all languages have warts". Do I even need to actually explain the fallacy there?

On the other hand, I agree 100% that PHP's deployment story is awesome! But is that because PHP did anything useful, or because Apache and Nginx support PHP out of the box?

<comment><USER5> Just like I tell people that buy cordless drills at Harbor Freight, "sometimes it IS the tool". Does that mean you can't build fast, meaningful, cool things with it? Of course you can. But, the deeper you get, the more problems you'll have to solve with weird esoteric knowledge. I'll agree with all of your points on horribly inconsistent and broken language features.

I get that people that have grown up with the language, or folks who have used it full time for years, don't see these blemishes as that big of a deal. But to newcomers, or folks from other languages, it's an affront. I hate to pile on an old, worn out issue but, as a language designer/implementer, the moment you start working on `mysql_real_escape_string()`, a huge warning bell should have gone off! I'm fine if people want to question my competence in writing code. It happens all the time on HN. I've been at it for 20 years... so some rando telling me that I don't know what I'm doing is pretty common. What we find in PHP though is quite a bit of tribal/tacit knowledge. And it's wrong to blame the user.

<comment><USER6> I mean, who uses mysql_real_escape_string when you have PDO and bindings ?

PHP isn't perfect. As OP said, no language is, and any competent software engineer uses the parts of the language that work well for them, and just ignores the things that don't work for them. I don't believe for a second that the abuse the language has suffered over the years has anything to do with mysql_real_escape_string, it's more to do with crappy code. You can write crappy code in any language, and it's more a reflection of the programmer than the programming language IMHO.

Part of PHP's problem is that it's so easy to use. Any C programmer can pick up the basics pretty easily, hack together something that scratches an itch, and move on. Later someone will criticize the quick hack and say "you didn't use mysql_real_escape_string so that code has a SQL vulnerability. Don't use PHP". In reality, there are mechanisms for preventing SQL injection and they just weren't used. Is that a failing of the language ? Partly, perhaps, for providing the unsafe way of doing things, but a lot of blame also lies with the coder.

I'll admit to a soft spot for PHP - I was putting database-driven websites on the web when that wasn't much of a thing (back in 1981, if foggy memory recalls true). I wrote the asset management system that was used by Lucasfilm on Star Wars, by Manix on the Matrix, by various post-production houses in Soho, etc. etc. - all in PHP. We had video-streaming from remote locations before RealNetworks were mainstream. All because of PHP.

I also used PHP to write a content management system for the RiskWaters Group - around 100 magazines in the CMS, with forums, mailmerge, access-rights per page or per view-count or per time-period, with back-end admin pages, with macros the editors could use, etc. etc.

Used properly and judiciously, PHP is a powerful tool. It comes with a few areas that ought to be marked 'here be dragons', but frankly so do most languages.

These days, I mostly use PHP for shell-scripting (it comes installed as standard on my Mac), nothing so grandiose as the halcyon days of yore, but I still have PHP to thank for getting the job I've had for the last 15 years, in R&D at Apple ("these are the guys that Lucas was talking about", said the VP who bought my small company).

I'll finish with a line from a song "Baby, life's what you make it, celebrate it". That applies to PHP as well.

<comment><USER5> > I mean, who uses mysql_real_escape_string when you have PDO and bindings ?

You've made my point. A person with tribal knowledge probably would NOT. Any new user coming from reading an older blog post or perhaps a PHP book would have no idea that that "older approach" is out of date.

Furthermore, the more precise point I was trying to make there was as a language designer, how on earth would you be okay implementing something like that? (Remove my example of `mysql_read_escape_string()` and insert any of the more WTF features of PHP.

Lastly, see my comment about being able to build meaningful, fast, cool things with PHP. I never want to tear down anyone's hard work. (Rasmus/Zeev/etc included).

<comment><USER7> [https://dev.mysql.com/doc/refman/8.0/en/mysql-real-escape- st...](https://dev.mysql.com/doc/refman/8.0/en/mysql-real-escape-string.html)

Many of the PHP extensions are direct exposure to underlying libraries. MySQL introduced a 'real escape string' in their client library, PHP exposed that directly. Had they ignored it, or renamed it, or changed param order, people would have complained about that too, no?

> Any new user coming from reading an older blog post or perhaps a PHP book > would have no idea that that "older approach" is out of date

You could mostly get that from going to the PHP doc site itself, which would indicate things that are deprecated. Or your IDE might tell you.

Or, for things that are really out of date, like mysql_real_escape_string, they simply ... aren't in the language any more, having been removed completely from PHP7 several years ago. If someone is starting brand new today using a blog post walking them through setting up PHP5... they'll have much bigger problems.

There's a shitload of 'tribal knowledge' around stuff in many languages - <USER2> find out a lot of that stuff via searching. If I read an 'older blog post' on Go from 2015, and complained that my Go didn't work very well (or was insecure, or whatever), how much blame should the language itself take?

<comment><USER8> > Many of the PHP extensions are direct exposure to underlying libraries. > MySQL introduced a 'real escape string' in their client library, PHP exposed > that directly. Had they ignored it, or renamed it, or changed param order, > people would have complained about that too, no?

Don't most ecosystems use some type of namespace for that instead of exposing everything as global functions? Those practices were quite late to the PHP community.

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> PHP is damn fast now, no joke. And with all of the modern features it's actually not so bad to work in.

I'm becoming increasingly puzzled every time I see PHP hate now, especially when I read tired comments like "just use rails". Laravel is arguably as good or even better than rails at this point, and PHP 7+ is definitely light years faster and lighter.

One thing that still sucks is package management / composer.

<comment><USER10> What are the "modern" features of php? It looks like it's trying to shed it's dynamic nature and add types (with annotations etc). Also frameworks like Symfony / Laravel look more and more like java web frameworks to me. I'm not saying this is necessarily bad but there's nothing modern about types. Also, might make more sense to choose java if you need types.

<comment><USER11> The biggest advantages of PHP over Java are build and deploy times, so coding a php app is much more rapid. You can test your app right away, even after a single line change and get immediate feedback on the screen, which I think is important in web dev because a lot of it is visual. The other advantage is the run-time. Java has a slow startup time and when you redeploy then you need to stop/start your entire app. With php you can fix / update one part of your app without the need for a server restart. Another advantage is that php runs each request with a clean state, that means all the variables get destroyed after the request, helping to avoiding memory leaks, and possibly issues with concurrency which Java exposes. Types are great, but sometimes they can get in the way too and slow you down, (I still haven't figured out what those <funny> types mean). In all, development in PHP is so much faster and easier over Java.

<comment><USER12> > Another advantage is that php runs each request with a clean state

PHP apps are almost guaranteed to be "stateless", thus scaling up and down is quasi-painless also.

<comment><USER13> OTOH, sometime you need state, then you feel stuck with a half-finished language.

<comment><USER14> What are you using state for in a web app or API?

<comment><USER13> Yeah sure, no need for state in a CRUD API. But while it is the most common use case for PHP applications (well actually for application written in scripting languages working with http servers), it's not the only use case.

When the only place where you can put state is the database then every piece of state is written in the database. Which lead to intelligent individuals (no pun/offense intended) to write clever piece of infra such as Redis. The truth is, for 10 Redis deployment there's 7 (8? 6? Well, a _substantial part_ ) where a long living process holding little state would have done the trick. Now you need to deploy, maintain and scale Redis too.

<comment><USER15> What's wrong with using session variables for maintaining state?

<comment><USER16> Session variables are tied to user sessions (like name suggests), so they cannot be used to persist application state (e.g. cached content, compiled templates, metrics, etc.)

<comment><USER13> Exactly.

I see downvotes on my GP post, I'm simply stating the fact: if you need state for a building a powerful webapp then obviously there's better runtimes that PHP+Apache, I don't see how one could disagree with that statement, apart from not having sufficient experience in that matter.

There's plenty of good reasons to counterbalance that fact thought, PHP has a very good ecosystem, multiple mature/powerful web frameworks, and cheap/abundant workforce. But it lacks a state holding runtime and for the most demanding applications it's a sufficiently big technical hassle to encourage seeking other runtime and/or language.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER17> "Smarty released. The best-known templating engine for PHP.

Rasmus realized that he had done something wrong when people started writing template engines for his template engine in his template engine"

:D

<comment><USER18> I strongly agree Smarty is beyond terrible (and I've used it and read the source code, so I know its problems first hand) and the fact that it even exists is indicitive of deep flaws in PHP, but I don't believe Rasmus has ever realized that he did anything wrong. He just doesn't care.

"We have things like protected properties. We have abstract methods. We have all this stuff that your computer science teacher told you you should be using. I DON'T CARE about this crap at all." -Rasmus Lerdorf

"I'm not a real programmer. I throw together things until it works then I move on. The real programmers will say Yeah it works but you're leaking memory everywhere. Perhaps we should fix that. I'll just restart Apache every 10 requests." -Rasmus Lerdorf

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

DonHopkins 9 months ago | parent | favorite | on: YAML: Probably not so great after all

One of the most ridiculous examples of this was the Smarty templating language for PHP. Somebody got the silly idea in their head of implementing a templating language in PHP, even though PHP is ALREADY a templating language. So they took out all the useful features of PHP, then stuck a few of them back in with even goofier inconsistent hard-to-learn syntax, in a way that required a code generation step, and made templates absolutely impossible to debug.

So in the end your template programmers need to know something just as difficult as PHP itself, yet even more esoteric and less well documented, and it doesn't even end up saving PHP programmers any time, either.

[https://web.archive.org/web/20100226023855/http://lutt.se/bl...](https://web.archive.org/web/20100226023855/http://lutt.se/blog/2006/08/13/why- template-engines-like-smarty-sucks-in-php.html)

>Bad things you accomplish when using Smarty:

>Adding a second language to program in, and increasing the complexity. And the language is not well spread at all, allthough it is'nt hard to learn.

>Not really making the code more readable for the designer.

>You include a lot of code which, in my eyes, is just overkill (more code to parse means slower sites).

[https://web.archive.org/web/20090227001433/http://www.rantin...](https://web.archive.org/web/20090227001433/http://www.ranting- wolf.info/2008/03/21/php-truth-about-short-open-tags-and-smarty/)

>Most people would argue, that Smarty is a good solution for templating. I really can't see any valid reasons, that that is so. Specially since "Templating" and "Language" should never be in the same statement. Let alone one word after another. People are telling me, that Smarty is "better for designers, since they don't need to learn PHP!". Wait. What? You're not learning one programming language, but you're learning some other? What's the point in that, anyway? Do us all a favour, and just think the next time you issue that statement, okay?

[http://www.ianbicking.org/php-ghetto.html](http://www.ianbicking.org/php- ghetto.html)

>I think the Broken Windows theory applies here. PHP is such a load of crap, right down to the standard library, that it creates a culture where it's acceptable to write horrible code. The bugs and security holes are so common, it doesn't seem so important to keep everything in order and audited. Fixes get applied wholesale, with monstrosities like magic quotes. It's like a shoot-first-ask-questions-later policing policy -- sure some apps get messed up, but maybe you catch a few attacks in the process. It's what happened when the language designers gave up. Maybe with PHP 5 they are trying to clean up the neighborhood, but that doesn't change the fact when you program in PHP you are programming in a dump.

<comment><USER19> Why is the use of Blade(Laravel) or Twig(Symfony) any more acceptable than Smarty?

<comment><USER20> I personally like having the front end templates separated from the server code as much as possible. I think Blade accomplishes this while also providing you with a syntax that is much more readable than Smarty. On top of that I feel like Blade isn't necessarily trying to do as much as Smarty.

EDIT: I certainly prefer using Blade to doing the old '<a href="' . $url . '">... and other similar variants.

</comment></comment></comment></comment><comment><USER21> I've written many languages (starting with ML –Machine Language).

I'm currently developing in Swift, and loving it.

I wrote PHP for about 20 of its 25 years. I never really got to love the language, but got fairly good with it. I don't miss it much.

I have used it to write some industrial-scale systems, though. It's a perfectly good language, and is still under active development and improvement; with a vast user base and [m|b]illions of pages of support.

Even though a lot of us like to live on "the bleeding edge," I've found that it's a good idea to stick with the classics for shipping code.

Nowadays, "the classics" includes JS and Python, so there are definitely good, well-supported, mature alternatives to PHP.

I also programmed C++, and ran a C++ shop, for many years. I always find the hate poured onto C++, with the annual "C++ is dead" pronouncement, quite amusing.

But I really like Swift.

<comment><USER22> I enjoyed working with Swift, and I did enjoy working on Objective-C as well back when; my main gripe with Swift is that it's still a niche language for niche applications, unfortunately, and only really practical in a Mac environment.

XCode is great though, I miss working with it. I miss the browser-like swipe- to-go-back operation. I did set up a theme similar to Midnight in IntelliJ though.

<comment><USER21> Yes, but it is the prescribed language for native applications (like C#). Java is really becoming a "niche" language for Android development (until it is replaced with something like Go or Dart). We are seeing less and less of it for server code, as Python and JS take over.

C++ is becoming "niche" for engine code. I'm glad it's no longer really used for UI.

There's a lot of specialized languages popping out of the woodwork, these days. I once worked with an image processing language called Halide, which I found to be quite painful (it's basically an FP language with the good parts removed), but an interesting idea. Totally niche.

[https://halide-lang.org/](https://halide-lang.org/)

</comment></comment></comment><comment><USER23> Rasmus Lerdorf look at the last 25 years of PHP: [https://www.youtube.com/watch?v=wCZ5TJCBWM](https://www.youtube.com/watch?v=wCZ5TJCBWM)

Really interesting for anyone wondering what the thinking was behind function naming and other inconsistencies jump to: [https://youtu.be/wCZ5TJCBWMg?t=987](https://youtu.be/wCZ5TJCBWMg?t=987) and [https://youtu.be/wCZ5TJCBWMg?t=1466](https://youtu.be/wCZ5TJCBWMg?t=1466)

<comment><USER24> If I look from outside - it looks like there was exactly 0 thinking involved in function naming.

<comment> _-david-_ That is the look on the inside as well.

</comment></comment></comment><comment><USER25> > PHP to have str_contains() A function that checks if a string is contained > in another string? That should only take about 25 years.

For anyone else confused by the newest thing on the list who is wondering what the heck str_contains() does that you could not already easily do with strstr() or strpos() since time immemorial, the answer is nothing.

The only difference between str_contains($needle, $haystack) and strstr($needle, $haystack) and strpos($needle, $haystack) is that after they all make exactly the same C function call:

      php_memnstr(ZSTR_VAL(haystack), ZSTR_VAL(needle), ZSTR_LEN(needle), ZSTR_VAL(haystack) + ZSTR_LEN(haystack))

which returns either a pointer to the needle string in the haystack string or NULL,

• str_contains() return false or true, depending on whether that pointer is NULL or not,

• strstr() returns false or the part of haystack starting with needle, depending on whether that pointer is NULL or not, and

• strpos() returns false or the offset of needle within haystack, depending on whether that pointer is NULL or not.

It's equivalent to just writing (strpos(...) !== false) in your current code.

The rationale for adding str_compare() is that strstr() and strpos() are not intuitive, easy to get wrong, or hard for new developers to remember.

<comment><USER22> I personally don't object to 'trivial' functions sprinkled in my stdlib. I mean your own comment already highlights it, the return value of strstr() and strpos() is not intuitive, whereas you expect a boolean for a 'contains()' function.

Of course, it also highlights one of PHP's often repeated criticisms, that of function naming inconsistency.

</comment></comment><comment><USER26> Most people don't know this and the timeline also doesn't make it very clear: PHP never started as a language but as a templating system for C.

Feature requests were quickly added and that's why PHP became a language with a lot of quirk's.

Today that is totally different. As a scripting language it is blazing fast. It still has some strange corners, but it's amazing that a templating system because such a wide used language.

</comment><comment><USER27> I started with PHP 15 years ago, but after 5 years I just moved to Java.

The worst thing with PHP was people and standards, everything was a mess, there was no right way to do stuff and larger projects had like 100 different implementations for the same thing. PHP was really challenging to work with as coming to a shared agreement for how one should implement stuff was a recipe for personal conflicts.

So after a few years, I just started to code web applications with Java. A completely different, but much more enjoyable environment and much more friendly people.

I guess PHP is much more fun today, it was really fun to code in PHP as it was really simple and you feel productive and powerful. But in the old days, bad defaults often caused issues in production. And some of the documentation/knowledge sharing was dangerous(tutorials lacked warnings and information about preventing SQL injections).

<comment><USER28> Symfony really paved the way for quality PHP code. Excellent Web framework which is a lot of fun.

<comment><USER19> I could never buy a screen wide enough to display a full path with Symfony. Not quite as bad as its predecessor - Zend Framework - but finding the end of a file path was like jumping down a rabbit hole.

</comment></comment></comment><comment><USER29> Long time ago I was learning Perl, because at that time basically the whole Internet ran on Perl CGI scripts. I thought, "man, Perl is weird".

Then I learnt PHP, because whole internet seemed to move to Apache+PHP. I thought, "man, that's Perl done right!".

Then I actually learnt Perl, looked at my PHP code written earlier. I thought "WTF?"

Now I use Python. I think "man, why I have to type this silly whitespace?"

<comment><USER30> I can't wait to see what's next for you!

</comment></comment><comment><USER31> I started my professional developer career with PHP 5.2 I think end of 2006.

While the langugage design was garbage, I the developer experience was quite awesome.

This was a curse and a blessing. On the one hand it lowered the bar for many people to get into programming, on the other hand it led many people to believe they can do anything even when venturing in system designs that were much above their pay grade.

I switched to JavaScript in 2011 and again, it was mostly for DX.

The language felt more light-weight (no $ or classes), while it still had similar problems as PHP and being able to use it full stack eased context switching rather much.

Node.js deployments felt much slimmer than setting up PHP with Apache/Nginx too.

I still missed a bit of the "drop a source file in a folder and its an API" feeling.

Last few weeks I played around with Cloudflare Workers and that got me a bit of the PHP feeling again. I can simply say "This file runs at that path" and be done with it.

</comment><comment><USER32> After several years now of defaulting to Go, in the last month I've gone back to PHP (specifically Laravel) for a new project.

It's... comfortable. That's probably the best way I can describe how I feel about it. I've missed working in PHP, despite how much I enjoy Go.

<comment><USER33> Same. I love Go, the language, much more than PHP, but Laravel.. Laravel is really great.

I wish Go had something as convenient and complete as Laravel. Unfortunately that's impossible to achieve in a static language without polymorphism (generics) or metaprogramming.

I'm waiting for Go to introduce polymorphism and I'll be watching closely to see how 'post-generics' web frameworks make Go great again!

<comment><USER19> Have you tried the Buffalo framework? It's touted as Go's answer to Rails.

<comment><USER32> I've tried Buffalo. It's... fine, but it doesn't have the same feel as Laravel does for PHP.

</comment></comment></comment></comment><comment><USER34> While I don't use PHP today, it always makes me wonder at deceptively easy it is to deploy a PHP app.

There's no having to worry about restarting processes since the next request picks up the code changes and deploying at scale has so many problems auto- solved by that such as rolling restarts.

You can then handle things like percent based feature roll outs at the application level which is likely where it belongs anyways.

On the flip side, for single server deploys, you can also get by with zero down deploys without needing to set anything up. Most other languages and frameworks can't do this, or the way they do it involves doing very complicated things or using even more complicated tools to solve the problem for you.

It's funny to think back in the early 2000s I was using PHP and deploying was brain dead simple then, but fast forward almost 20 years and it's still pretty much the case today -- at least it seems that way based on the talks I've seen around using PHP in production over the years.

<comment><USER35> >There's no having to worry about restarting processes since the next request picks up the code changes and deploying at scale has so many problems auto- solved by that such as rolling restarts.

Nearly any serious PHP deployment will use an opcode cache which has to be invalidated, though maybe they are smart enough to do that from the filesystem now.

>On the flip side, for single server deploys, you can also get by with zero down deploys without needing to set anything up

Mod_python works about the same as mod_php although you are right insofar as most advice is to use a separate uWSGI process.

>You can then handle things like percent based feature roll outs at the application level which is likely where it belongs anyways.

You want incremental rollout essentially every time you change code; if you feature flagged every single change, you'd have your codebase's entire history all hanging out on master, with far too many possible combinations of feature flags to ever test. The nice thing about rolling back and forth with code is that each version is internally coherent.

<comment><USER34> > Nearly any serious PHP deployment will use an opcode cache which has to be > invalidated, though maybe they are smart enough to do that from the > filesystem now.

Etsy has a massive PHP deployment. In one of their talks they mentioned one of the main perks of using PHP is they can just drop code onto a server and be done with it. They are operating at pretty crazy scale. Even deploying to hundreds of servers can happen very very quickly since you don't need to step through a tiered rolling restart.

> You want incremental rollout essentially every time you change code; if you > feature flagged every single change, you'd have your codebase's entire > history all hanging out on master, with far too many possible combinations > of feature flags to ever test.

Often times you want to restrict features or certain things based on business logic in your app, not just a "dumb" load balancer. For example, you might want to enable new things for specific users who opt into a beta program or maybe only staff to start. But it could also be to a % of users. Usually the idea is to feature flag bigger things and once it's rolled out fully you remove the flag and now it's just something that exists all the time. Of course this depends on your organization tho.

</comment></comment></comment><comment><USER36> It's so crazy to see how far the language has come, and how much it's matured! I started working in Perl around '98-99, switched to PHP in 2000 just after PHP 4 came out, and ended up running a company around it for all of my 20's. Very thankful for the language and community that made that possible.

These days I still write a fair bit of PHP, but mainly C# and Go, and some Javascript. I understand the criticisms of each language, but I don't mind the type inference/coercion in scripting languages and don't find it actually results in that many bugs. Although I do appreciate the clarity of choosing your types and understanding their performance implications in C# and Go. I guess it comes down to the right tool for the job, and some jobs do just fine without strict types.

Since 7, PHP's also gotten fast enough that most web-related tasks are just faster to solve with it, and it's so easy to deploy a Go binary alongside it for performance-critical parts that it feels like a killer combo in terms of productivity vs performance. Really itching to play with Roadrunner next, which blends those two together into a single app server ([https://roadrunner.dev/](https://roadrunner.dev/)).

</comment><comment><USER37> I've been working with PHP for a very long time and apart from web it is also very good at writing shell scripts too.

One of my recent project called 'howdoi' (1) is written in less than 70 lines of code (ignoring ws) - no libraries, no deps and backward comptabile to 5.0. Just copy-paste the file and it's go! If you know how to use it, it's really useful language.

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

<comment><USER4> I'm really surprised that PHP hasn't picked up in this area. It's a great tool when you're too big for bash, but not big enough for, well, a "more proper" language...

<comment><USER37> Yeah an in-place file-editing feature like Perl or sed has would make it very useful for command line use too.

</comment></comment></comment><comment><USER38> Fine. After 20+ years of PHP development I'm going to give it a shot. Will be attempting to migrate from VSCode. Any tips for that transition in particular, or for setting up PHPStorm in general? I have a subscription to Laracasts and plan on watching that series, but I'm not sure if it's outdated. Thanks!

<comment><USER39> There's a fairly good plugin for JetBrains IDEs called "Key Promoter X" that reminds you whenever you do an action (click build, open a terminal, change directories) of the keyboard shortcut to do that same thing. It's very handy for getting into the workflow quickly.

<comment><USER40> Thanks for this. I'm not necessarily aiming for mouse-free development, but I've known for years that I could be better with keyboard shortcuts. I had no idea this was a thing.

</comment></comment></comment><comment><USER41> I wish more digital subscription models were more like the jetbrains one. If you paid for one year continously they handle it like you own that specific phpstorm version, even if you cancel your subscription.

That said, I wish I could subscribe without having a company ._.

<comment><USER42> What do you mean? They do offer licenses for individuals, and I've had a personal license for over seven years now.

<comment><USER43> He might be referring to the UX problem they have on the sales page where it is non-intuitive that you have to click a button to switch to the individual pricing. This affected me recently.

<comment><USER44> Holy shit I was just looking at their site the other day and bounced because the price was way beyond anything I'd consider spending. It didn't occur to me that they price differently for individuals, or that it'd default to showing me organization pricing, and after reading theses posts and checking the site my first guess was that individual pricing would be _higher_ (it's much lower for some reason? Are the org. ones multi-seat? They don't seem to be. WTF.)

I'd never have even looked at their site again if I hadn't happened to read these posts. Yikes. They need to call that out _much_ more vividly if they're gonna have weird pricing like that.

<comment><USER7> I think the org/business ones are 'seat' \- not named licenses. Devs may come and go, but the org can have, say, 8 seats.

</comment></comment></comment></comment></comment><comment><USER45> 'This page is best viewed in landscape mode'

I don't think I'm going to rotate my desktop monitor just for your website :)

<comment><USER46> Your desktop monitor should already be in landscape mode, shouldn't it?

<comment><USER47> Not if you code a lot. It is not rare for developer to use vertical screen. [https://img.devrant.com/devrant/rant/r_200135_Q9Fh4.jpg](https://img.devrant.com/devrant/rant/r_200135_Q9Fh4.jpg)

<comment><USER48> I mean I'd say it's pretty rare. I've only seen a handful of people do it personally, and I've never seen anyone _exclusively_ use a portrait screen.

<comment> V-2 With modern monitors being as large as they are already, I'd say the need for a vertical monitor is likely an indication you're working with spaghetti code.

<comment><USER49> With modern monitors being as large as they are already, I'd say the need for a landscape monitor is likely an indication you are working in callback hell.

<comment> V-2 But it's not code all the way from side to side; I've got project structure on, etc.

Meanwhile on the screenshot in the comment I responded to, the vertical monitor is shown only to display a long script or program of sorts, nothing else. I googled for the images of "vertical monitor programming", and the same is true for virtually every picture of such setup. I feel it's not a coincidence

</comment></comment></comment></comment></comment></comment></comment><comment><USER50> I have a theory that PHP is kind of like erlang -- as a framework and dev environment, not the language itself.

Each request is pretty much independent of the others, and each one can independently crash.

There was also CGI, but CGI always felt a little heavier, and the crashes were harsher (usually just a 501 error and nothing more). PHP embraced the crashes more and provided more information allowing faster debugging.

As a result, generally it was pretty easy to make resilient software.

Critically, PHP also embraced SQL databases, so that crashing meant aborting the transaction (if any). Erlang never meshed quite as well with transactional databases, so trying to keep consistent shared state in erlang felt tricky. In PHP, it was natural.

<comment><USER51> > Each request is pretty much independent of the others, and each one can > independently crash.

Not the case anymore with phpfpm.

<comment><USER52> php-fpm uses a worker pool. How is this true unless you corrupt the shared memory segment?

<comment><USER51> I haven't checked it, but I think the worker stays up, and deal with several requests during its life time, not just one then die. Hence, there is pesistence.

<comment><USER52> As long as there is nothing broken in internals (a very big if, to be fair), user code crashing will not affect subsequent requests.

</comment></comment></comment></comment></comment><comment><USER53> I first met Rasmus during my pre-internet BBS days in Toronto, and reached out to him shortly after moving to the Bay Area in '95 when he told me about his pet "Personal Home Page" project. What an amazing trajectory!

<comment><USER54> Very cool. How did you cross paths?

<comment><USER53> He was just another dude on the Zooid BBS, which I dialed up on my 300 baud modem. [https://en.wikipedia.org/wiki/Zooid_BBS](https://en.wikipedia.org/wiki/Zooid_BBS)

</comment></comment></comment><comment><USER55> What ever happened to the PHP-FIG? I noticed in the timeline projects kept dropping from it in the past 2 years. It seemed to have a lot of momentum for a while producing PSRs that were very widely adopted.

<comment><USER56> Afaik after the whole PHPixie scandal, they got backlash but the PSR standards they adopted are still in use.

PHPixie thread: [https://groups.google.com/forum/#!topic/php- fig/cjLBp2weYaA](https://groups.google.com/forum/#!topic/php-fig/cjLBp2weYaA)

<comment><USER55> Oh my. I lol'ed at the comment:

> A big +1 to what Robert said. Let's not be the PHP Drama Group or the PHP > Court of Social Justice.

It seems like all these "groups that have arbitrary mechanisms for becoming a member and have some sway in the wider community" eventually end up becoming a giant ball of drama and controversy.

<comment><USER57> But doesn't that criteria also describe every open source mailing list ever?

</comment></comment></comment></comment><comment><USER58> Anonymous function and callbacks in PHP are a mess (Have you ever heard of Closure::fromCallable). Native function name and argument order are a mess with no clear convention. This thinks alone have made me abandon the language a couple of years ago. (I have two Zend PHP certifications and I was using PHP since v.3). Now I'm very very happy with fullstack Javascript (plus occasional TS help).

</comment><comment><USER59> It has been a long time since I have had to deal with Other People's PHP and I have never had to with my own. Mostly, I have had to at least glance over student projects that had security issues I could drive a bus through, honking and dragging a bunch of rusty bikes.

In terms of language _design_ , I couldn't speak to it. I've never designed a language and they are intensely personal things. However, I have the vague sense that the _culture_ of PHP (installed by default, easy to get working) created many fire-and-forget projects done to scratch an immediate itch with no sense for maintenance. It works? Ship it.

You can write obfuscated code in any language, but some languages have a culture which encourages it, such as Perl. Similarly, I think many perceptions of PHP arose from a "make it work, now, anything else is someone else's problem later" mindset I saw from the people who were developing in it.

I would be interested in other perspectives.

</comment><comment><USER60> I think probably the most ironic thing about all the hate PHP gets, is that those who hate it the most seem to assume that the people who chose to use it did so without exploring other options.

So {your favorite language here} was turned down by a potential developer because they saw PHP as the better option. People aren't stupid but from all the rhetoric it seems the "geniuses" in the group think they are.

I wish I could request a POLL here. I'd ask, from all the people who hate PHP and write extremely long posts about their hate for the language: How many of you used some of that energy you expend hating PHP to write a patch or feature for your favorite language to make it more desirable for other developers?

</comment><comment><USER61> One thing I really enjoy in JS world is an ability to write both back and front in same language. SPAs now being the norm also puts more weight towards front. PHP had a knack for 'just works' in most cases and will always be dear to my heart.

</comment><comment><USER62> PHP is still dominant in CMS space. If you are writing webapps use something else. But if you are working on content then PHP CMS ecosystem is just way ahead of everything else. You almost can't afford to go around it. And I dont mean Wordpress. Modern CMSes like Craft, Kirby, Twill or even things like Bolt, Processwire or Grav... they are pretty great mature platforms for custom content websites and basic CRUD.

Hell with Wordpress (which i hate) and some plugins you get your own self hosted website builder ala Squarespace. PrestaShop and OpenCart are solid ecommerce solutions.

It's too dirty and DIY but it gets job done for most small to medium size businesses.

</comment><comment><USER63> What I love about PHP is its learning curve. You can quickly start making things.

I started two decades ago with dirty PHP mixed with HTML pages, then I learned templating. Then I learned OOP, classes, interfaces, abstract classes, traits, managing dependencies and unit tests. All of these with PHP, no framework.

Because PHP is quite easy to use, I learned all these "general" principles thanks to it. I guess nostalgia plays a big part in my appreciation of this language but I will just say one thing: thank you PHP!

</comment><comment><USER64> Amazing how many complete rewrites that timeline contains... :)

<comment><USER65> 3

tbf i have a 12 year old php game that basically prints money - the only thing i had to change was the old mysql module (which was not even buggy/unsafe - just unmaintained).

<comment><USER66> What does it do?

<comment><USER67> It says game

</comment></comment></comment></comment><comment><USER68> And WordPress, which is hated even by PHP devs, continues to grow now powering 37.3% of all websites [1]. Until last year, it maintained compatibility with PHP 5.2 essentially relying on PHP of the 2007 (now bumped to 5.6 which was released in 2014).

[1] [https://w3techs.com/technologies/overview/content_management](https://w3techs.com/technologies/overview/content_management)

</comment><comment><USER69> I believe PHP will still be relevant and a lot of the fancy frontend frameworks out there won't be around anymore. Some kind of lindy effect in place.

<comment><USER70> I first heard about the Lindy Effect from Nicholas Taleb -- for those who don't know it:

The Lindy effect is a theory that the future life expectancy of some non- perishable things like a technology or an idea is proportional to their current age, so that every additional period of survival implies a longer remaining life expectancy.

</comment></comment><comment><USER71> I taught myself PHP back in 2007 as it was the only language which had a single click installer (WAMP) & easy tutorial to learn (w3schools) to get started with programming. Since then I wrote a lot of PHP, initially for myself then professionally once I got a good handle on it, until 2012.

Now I'm again thinking of picking up PHP for my side projects because of Laravel.

</comment><comment><USER72> I'm not a php developer - syntax ain't for me. but props to these folks man. 25 years of getting shit done. shipping, amidst the jeers. I look at Laravel as one of the big 3 web frameworks to use if you're serious about shipping stuff. & in the PHP world, everything has been done - so you won't be doing anything new.

</comment><comment><USER73> What I tell other people what it's been like working with PHP, it's usually this:

"Working with PHP is like having a crazy guy with a gun on your side, by his nature he is powerful and potent, and you can definitely get a lot of stuff done with him... but who the hell gave this guy a gun?"

</comment><comment><USER74> There are only two kinds of programming languages. Those that everyone hates, and those that no one uses.

Everyone hates PHP.

</comment><comment><USER75> I kinda prefer PHP for most of my web backends like yet another REST API.

Modern framewrok like Comet easily beats any NodeJS or Python project regarding performance and latency:

[https://github.com/gotzmann/comet](https://github.com/gotzmann/comet)

</comment><comment><USER76> I gotta say... PHP has grown so much and growing further in the right direction (with union types and async I/O).

At the speed of its improvements... it's kind of embarrassing other dynamic languages (I am looking at you Python, even though you are one of my favorites).

</comment><comment><USER77> I've been using PHP for most of my web development career (a decade). What are the industry standards for backend web development languages in 2020? I was under the impression PHP was the way to go for back end web development.

<comment><USER78> I would say golang has been a strong contender for that role for a while now besides the usual java/ruby/python stacks. You can use many languages for your backend, but golang is IMHO the best out there right now (but as always: it really depends on your use-case)

<comment><USER79> Hidden advertising for Go. Nothing better than good old C++.

</comment></comment></comment><comment><USER80> > They [two startup founders] find PHP/FI 2.0 to be inefficient and lacking > features. In 1997 they embark on a complete rewrite of the underlying > interpreter.

Wild. Doing something like this today would be considered so tangential and risky.

</comment><comment><USER81> "PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil, perpetrated by skilled but perverted professionals." -Jon Ribbens. Programmer.

</comment><comment><USER82> I'm thankful for PHP. I don't use it on regular basis or even as my main programming language, but I do use it for side gigs and smaller projects to earn extra cash.

It's fast, easy to get into and does the job for me.

</comment><comment><USER83> If it's THAT bad.. why is it still around and under active development 25 years on ?

Sure COBAL is also still around but the amount of new projects started in COBAL vs PHP is a lot less.

<comment><USER51> Because technologies don't win by being the best, or even by being good.

They just need to provide a killer feature and an easy path to adoption.

After that, inertia does the rest.

</comment></comment><comment><USER84> I haven't looked at PHP in ages. Now that I hear that the latest version are much better, does anyone have links to good quality PHP code that I can take a look at?

</comment><comment><USER85> Any pointers at SW that can build timelines in a similar way? I would like to get product roadmaps out in a similar way if it can be kept light weight.

</comment><comment><USER86> PHP as a _programming language_ is... okay. And it has come a long way in recent years to become "okay". But frankly, wasting another keystroke regurgitating to tired old "PHP sucks" trope would be to completely miss why PHP is so great (hear me out).

PHP as a _development paradigm_ is second to none. The reason to choose PHP isn't because it is such a great language, the reason to PHP is because it gives you the most power for the least effort compared to any platform targeting the web (fight me).

PHP is dead simple. I can make a new directory with a single index.php file and view it in my browser in less than 10 seconds. I can then change/add more files, hit F5, and _immediately_ see those changes reflected on my screen. It is the tightest feedback loop possible. I didn't have to remember/rely on any CLI helpers or package managers or debug tools. I didn't have to redeploy or recompile or restart _anything_... none of the bullshit. Just _one_ file in _one_ directory with _zero_ indirection. And we aren't even done yet!

PHP also gives you a built-in web framework out of the box. It _automatically_ parses server/request information and hands it to me for processing into a response. What's that? I don't need a special templating engine to format my output nicely either? PHP _is_ a templating engine! Did I mention routing is also built-in (and transparent) as well?

The above is why PHP has become so popular/beloved by so many (and hated by many more). Everyone complaining about the _language_ features ("array doesn't work the way I want it to!") is simply putting their ignorance on full display. There is nothing wrong with wanting something else out of your development environment/paradigm (heck, I've moved on too!), but don't blame PHP because it doesn't conform to _your_ idea of how an application should be written.

The above is also why I am so disappointed by the direction the PHP community seems to be taking the language. I am all for improving PHP as a language, but to be honest, I have a feeling the maintainers are going to prove all of those people that claim "PHP is just a worse Java" right... PHP will _never_ be as powerful of a language as Java or C#, and for the reasons I explain above, it _doesn 't matter_! Nobody is choosing PHP because of the language (if they were, they would have chosen Java/C# in the first place).

If you want to improve PHP, improve upon the things that make it great. _Lean in_ to templating. _Lean in_ to a more functional approach. _Lean in_ to includes. Screw it, add some more magic! Make the _platform_ more ergonomic. It was always the draw anyway. Who cares about the language...

</comment><comment><USER87> As a new web dev who's never learned PHP, is it worth it? I don't really need to write anything into production.

<comment><USER88> As another newish web dev, I think it depends. Best thing is to take a look at your local job market and see what people are using. In my area it's a lot of .Net, so I'm focusing more on that. Some other areas have lots of PHP jobs, others have Rails, etc. If you don't care about any of that, I still probably wouldn't pick PHP honestly. I went with Go for my toy project backend, but NodeJS is another good option I think.

</comment></comment><comment><USER89> May not be the prettiest language out there but it ALWAYS pays the bill.

</comment><comment><USER90> If you were starting a project now, would you choose PHP or Hack?

<comment><USER91> Hack is interesting and the native C++ interface is a breeze. But choose PHP if you want to live. Hack has only a fraction of the PHP ecosystem and if you mix with PHP, then you lose the advantages very quickly.

</comment></comment><comment><USER92> Great language to prototype webpage and backend

</comment><comment><USER93> Once or twice a year I have to peak at the code of a PHP app that was developed by interns more than 10 years ago. No framework was used, max 3 letters variables are the norm, no blank lines and the only comments are from code copy pasted from examples.

These days I would be more inclined to celebrate the death of PHP than its birthday !

However this app isn't GDPR compliant and I have good hope that it will be gone in about a year.

<comment><USER94> > interns

> more than 10 years ago

How that looks to me: Wow, that application has provided so much business value (over a decade worth) despite being designed by less experienced software engineers. PHP must be a great language.

<comment><USER93> It's non critical and isn't core to what we do. I don't have much time to allocate to it.

My point is that all else being equal if it had been developed in Java or C# my job would be much easier.

<comment><USER95> Why haven't you refactored those 3-letter variables to more descriptive ones?

</comment></comment></comment></comment><comment><USER96> Recently I have been thinking about moving my personal blog from Wordpress to a static site generator, because I don't allow comments or use Wordpress plugins. (Those who want comments can still use a combination of a static site generator and Disqus.)

It occurred to me that once I did that, I could completely disable PHP on my Apache installation. It made me wonder how much usage of PHP out there is essentially a historical accident, and that if modern static site generators had taken off before Movable Type, the language might have been much less widely adopted.

<comment><USER97> Depend on how you count what is static site generator.

Dreamweaver has a template system you can use to generate pages. It could probably be considered a WYSIWYG static site generator. I have never used FrontPage, but I would imagine similar system also exists. There are also a lot of other WYSIWYG website editors out there during late 1990s and early 2000's.

Despite that, CMS system thrives.

<comment><USER98> On the "easier to use" front, there was also iWeb and apps like RapidWeaver.

</comment></comment></comment><comment><USER99> Many people here don't understand the genius of Php. The language thrives of the ability to put out functionality that can be easily used by as many people as possible, even if it is not polished or technically perfect. This raises the ire of lots of programmers from "serious languages", which will usually take years to figure out the best syntax, the perfect framework and tooling environment, etc. While they're doing this, Php programmers are writing billions of lines of code to support millions of websites all over the world. Like many others, I sometimes hate the ugliness of what comes out from Php, but there is no question that it works to get the job done without having to learn the thousandth latest framework for language X.</comment>


How to Call B.S. On Big Data: A Practical Guide - <AUTHOR> http://www.newyorker.com/tech/elements/how-to-call-bullshit-on-big-data-a-practical-guide?intcid=mod-latest <comment><USER2> I love this one:

'Mind the Bullshit Asymmetry Principle, articulated by the Italian software developer Alberto Brandolini in 2013: the amount of energy needed to refute bullshit is an order of magnitude bigger than that needed to produce it. Or, as Jonathan Swift put it in 1710, "Falsehood flies, and truth comes limping after it."'

It summarizes my workplace experiences (yeah, confirmation bias). I've called bullshit on engineers a few times, but managers seem not to care. I gave up doing it, and instead whenever a engineer makes bullshit claims about a particular process/software/language I ask him "can you show us a working example?" Give them enough rope...

</comment><comment><USER3> Great article! But when I saw the New Yorker Url my first reation was - let's see how they are going to make this into something negative about Trump this time. They still live up to my expectations.

<comment><USER4> It was one joke said in passing. And it was directly relevant to the content of the sentence it was in.

I don't think your implied critique holds much water here. This isn't an academic paper anyway... it's an expository article written in the amusing/playful tone for which the publication is known.

<comment><USER3> Not sure if this was intended as a joke, or another one of those pedantic remarks. If they are serious about that argument they should start telling their advertisers not the total number of Unique Visitors, but the Unique Visitors in relation to the total number of Internet Users. I'd love to see how successful they became over the last 10 years...

<comment><USER5> That's silly, because every platform then has the same denominator of 'total internet users,' and you're dividing by the same number.

<comment><USER6> It's not silly because the number changes over time. It could make the difference between an upward trend and a downward trend. (Whether that difference matters is up to you, but it is a difference.)

<comment><USER5> But everybody faces the same trend in 'total worldwide internet users.' So if an advertiser has its choice of platforms to advertise on, it can compare the same metric, regardless of whether or not you do the division.

</comment></comment></comment></comment></comment></comment><comment><USER7> The title of the course would be just as accurate if they omitted the "on Big Data" part.

It's an applied philosophy course, really, about how to spot misleading claims.

<comment><USER8> Yeah, I am not sure what's "Big Data" about any of this.

<comment><USER9> That's very common in Big Data™

<comment><USER7> The first rule of Big Data is that you probably don't have Big Data.

<comment><USER10> Instead try to realize the truth. There is no data. Then you may realize it is not the data that is big... it is your head.

<comment><USER8> Or the portfolio of buzzword targets your investors/MBA frat boys/marketing vets want you to hit.

</comment></comment></comment></comment></comment></comment><comment><USER11> My guess about VCs and big data:

My guess is a special case of my guess about VCs and X for any new technology or tech buzz word X, that is, just substitute "big data" for X.

The guess is a special case of the difference between the sizzle and the steak. Or, remember, sell the sizzle, not the steak.

Well, VCs have Web sites and there commonly emphasize the X, the sizzle, they are interested in.

In fact, for a VC, X or sizzle with a dime won't cover even a 10 cent cup of coffee. And a VC won't invest even 10 cents in X or sizzle.

So, why do VCs emphasize their interest in X they don't care about?

Well, VCs want _deal flow_ , that is, entrepreneurs presenting their projects so claim they are interested in current sizzle X. Then entrepreneurs with a project in subject X will eagerly contact the VC.

Now what? Sure, the VC ignores the X, the sizzle, and looks for some steak, usually traction significant and growing rapidly, better still, revenue significant and growing rapidly. They also look at the founders, etc. The one thing they do NOT look at, understand, respect, evaluate, or care about is X or the sizzle.

None of this effort means anything for a VC unless they can see enough steak to start negotiations with the entrepreneurs. Now we see why the VCs said they were interested in X: During the negotiations, they will pretend to evaluate the business based on X, not on the steak. Then the VCs will denigrate, diss, minimize, insult, run down, criticize X as of not very solid business value and lower their evaluation ( _pre-money_ ) of the business. And THAT'S where the VCs get their payoff for their claims of interest in X.

So, selling/buying the sizzle instead of the steak hides the real value, the steak, and the VCs want to do that.

There must be some explanation for the very common practice of VCs saying they are interested in X. IMHO, no way are the VCs interested in X, _big data_ , AI, ML, etc. -- those topics are just sizzle to hide their interest in what they regard as steak.

If can, then check out my guess: Say, get a VC to explain any of the value of big data, AI, or ML in a reasonably solid and well informed way! Uh, "X is eating the world" is NOT good enough!

There must be an explanation, and my best guess is above!

YMMV!!

</comment><comment><USER12> Size doesn't matter... :-)</comment>


Live Map of Internet outages (stable at 4.000 per hour) - <AUTHOR> https://www.pingdom.com/livemap/

<comment><USER2> The business implications are clear!

Obligatory xkcd comic: [http://xkcd.com/1138/](http://xkcd.com/1138/)</comment>


Eau de Nil, the Light-Green Color of Egypt-Obsessed Europe - <AUTHOR> https://www.theparisreview.org/blog/2018/02/13/eau-de-nil-light-green-color-egypt-obsessed-europe/ <comment><USER2> `style="color:eaudenil;"`?</comment>


AWS CloudFormation now supports blue/green deployments for Amazon ECS - <AUTHOR> https://aws.amazon.com/about-aws/whats-new/2020/05/aws-cloudformation-now-supports-blue-green-deployments-for-amazon-ecs/ <comment><USER2> The cloudformation team is small bc the people who run it are not fun to work with and not willing to bring on talent with their own opinions. It's a weird irony, dug in and overall detrimental.

The only option teams that need CI/CD for their cloud resources & want to use cloudformation for most of it is to have a side chain process for handling resources that can't be expressed with Cloudformation. (not at all insurmountable but shouldn't be necessary)

<comment><USER3> roughly how many is "small"? 10? 20?

<comment><USER2> Very small - and to be clear this is not supposed to happen at Amazon or AWS it's "disagree and commit" vs "two pizza team".

It'll suss out eventually but not soon.

Start telling your teams to do what I said above and if anyone tells you "but we want to use one tool" tell them they must grow out of that.

</comment></comment></comment><comment><USER4> I've never understood CloudFormation's lag time in supporting new service functionality.

This launched nearly 3 years ago. [https://aws.amazon.com/blogs/compute/bluegreen- deployments-w...](https://aws.amazon.com/blogs/compute/bluegreen-deployments- with-amazon-ecs/)

<comment><USER5> Because while "ready" for new features includes API support, it does not include CloudFormation support. The problem is entirely AWS politics and culture.

<comment><USER6> Who builds the cloudformation support? I could understand not baking it in on an initial feature release but it should be there 'soon'.

Same with Config.

<comment><USER5> I've been told that each product team is supposed to add CloudFormation support themselves. For some reason, it's not treated as a high priority and often lands on the laps of the core CloudFormation team.

It may turn out that the tools that CloudFormation team provides don't make integration easy, especially if the operation takes longer than 15 minutes (meaning they can't implement support via a single lambda invocation as an under-the-hood custom resource).

<comment><USER7> You can also invoke a custom resource via SNS and then the SNS topic is subscribed to an API endpoint.

But it's hard to believe if the team responsible for the blue green deployment functionality developed an API endpoint to do it, they couldn't just hand it to the CF team to call. At the end of the day that's all CF does. Call APIs based on the different lifestyle events as far as how it actually creates resources.

<comment><USER6> >lifestyle events

Intentional or not, I'm going to start using this. :P

<comment><USER7> Ughhh. And it's outside of the edit window...

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> It looks like this uses a new, not yet documented, top level attribute in a template: Hook.

At least, I haven't found any documentation for it other than the template they say to copy in the linked user guide for this feature. Definitely not supported in CDK.

<comment><USER9> What's CDK in this context?

<comment><USER10> [https://github.com/aws/aws-cdk/](https://github.com/aws/aws-cdk/)

</comment></comment></comment><comment><USER11> The ECS default deployment model is quite frankly a disaster. I've written many Python/Go scripts over the years to wrangle it into a sensible form for CI/CD.

Good to see that they're working on it, but I don't know why they don't fix the underlying paradigm instead of making it Cloudformation exclusive.

<comment><USER12> I would love to know what the problem is. We do dozen of deployments every week with a ALB + ECS + Fargate setup. We upload a new container image, create a new task and launch as many tasks as desired (so if we want 2 containers running we launch 2, for a total of 4). ALB calls the /health endpoints on the new containers and if they pass the healthchecks it drains connections to the old containers and stops the tasks. This has worked seamlessly for a long time now without any downtime during deployments.

EDIT: I should mentioned that we are using AWS CDK for all of this. All it does is register a new task as the default task for a service and ECS/ALB does the rest.

<comment><USER13> I find ECS particularly, ECS on EC2, to be really painful for small deployments.

I just want a cluster that scales in and out to the amount of memory my tasks need, I'm not very concerned about CPU. Until capacity providers it was more or less impossible to do so without having a bunch of excess capacity provisioned. Even with capacity providers, I can't seem to get a cluster to scale in to 0 instances when no tasks are needed.

I have one ECS service that requires an EBS volume mount, which means that when the task definition is updated, I need the service to stop, so that the new task can mount the same volume. This deployment model is essentially impossible without implementing a custom deployment strategy.

Fargate makes things a bit easier, and now that you can use EFS volumes with it it might make more sense. But overall, everything in ECS just seems poorly designed, clunky and hacky, like many AWS products.

<comment> friend-monoid You can't do EFS on Fargate in CloudFormation yet though.

<comment><USER7> True. But you can do it with a custom resource.

[https://gist.github.com/guillaumesmo/4782e26500a3ac768888daa...](https://gist.github.com/guillaumesmo/4782e26500a3ac768888daab3c55b139)

</comment></comment></comment></comment></comment><comment><USER14> The list of restrictions in the user guide seems painful - cannot be used in the same template as nested stacks, cannot start a blue green deploy if other infrastructure would be modified at the same time, cannot import properties from other stacks, cannot export output properties. I was interested, but can't imagine using it with these restrictions.

<comment><USER14> Thinking about this further, the benefit of these restrictions is in avoiding conflicts where dependant infrastructure is updated in place before the blue green has completed. Lack of inputs and outputs still seems killer though.

</comment></comment><comment><USER15> I don't think I've ever met someone that actually uses cloudformation unless a template was provided them to setup something like a lambda.

Why would you when terraform exists?

<comment><USER16> Terraform doesn't support rollbacks (handy for application roll-outs) and if your shop is heavily invested in AWS CF is a perfectly fine tool. I've maintained and started up tens of thousands of lines of both TF and CF and they both have their strengths and weaknesses.

<comment><USER15> Sure it does? Revert your code and apply. It's not atomic but I'm guessing neither is CF.

I'm not sure I'd use either of these tools to roll out new code though.

<comment><USER16> That's more of a GitOps style intervention requiring a source change and the workflow to revert a change could certainly be done but is by design not a first class construct in Terraform providers (not every provider supports every feature such as importing of resources). To respond to a Cloudwatch (heck, Prometheus, Grafana, ELK, etc) alarm saying your error rate went up because of a Route53 change it's not out of the box with Terraform (would be a custom providers or null resources probably). And as a CLI application (granted, it's run more like an RPC style architecture) there's no obvious way to signal different failure levels and to respond to different failure modes of different resources.

CF roll-backs are on by default and will revert changes. Sometimes it can fail and be a real pain, but it's overall been more of a help for myself than harm.

</comment></comment></comment></comment><comment><USER17> I've been wondering: doesn't CDK depends on CloudFormation, as it basically converts code to CF files? (similar to Troposphere but with more languages supported).

If that's the case,I don't see how CDK stands a chance against Terraform or Pulumi.

And I'm not talking about multi cloud support, but just about the fact that an AWS-managed product, CloudFormation, keeps lagging behind for YEARS for such a core feature of a core AWS service.

</comment><comment><USER18> I'm almost surprised this welcome feature was implemented at all, as ECS development appears to have slowed in favor of EKS (Kubernetes).

Also too bad that it's still CloudFormation.</comment>