zmxz
USA embraced capitalism and is geared towards proving concepts FAST and enabling networking. I love that about USA and I miss that in Europe, when it comes to IT/Tech sector in particular.
I'm not aware if Europe produced anything of significance in the past 30 years, we're lagging heavily behind USA/China and that's a fact. One could argue that Linus Torvalds is European hence Linux === European but I won't resort to such petty claims.
We produced very little value. We're having issues due to language discrepancy. Even though a lot of people speak English, it's often the case that we Europeans aren't able to communicate as well using English as we can in our native tongue. The lack of unified language is visible. The diversity in culture drives people to favor their own, we're bad at teamplay (this is from my personal experience and I am guilty of this).
There's many valuable lessons we could have learned from USA but we failed to apply them. We have various freely available systems that are great at, say, education - but education means nothing when it's difficult to apply it once people are done with it.
I worked with plenty of people from USA and I had huge prejudices towards them, in terms of "they talk a lot" or "they are not as competent, they are really slow when it comes to pumping out code" but I learned I was wrong to the point it's not funny. If anything, USA is really good at starting and pushing projects out that actually work.
Ultimately, do we even have a microchip factory (we might, but I'm unaware of it)?
Sorry for the wall of text, I just wanted to explain my POV and agree with you.
Personally, I'd love to see movement in EU's tech sector. We're 30 years behind USA in tech. I won't touch upon quality of life or similar topics because I'm interested in exploring technology.
Claiming that it's unmatched, in an area such as IT where we can easily calculate whether this is true or not.. it's just silly and your comment provides no value to anyone.
Creating a few thousand "new object" takes less than 5 msec. Test it. I have.
FrankenPHP uses a Go-based balancer that distributes requests to array of pre-started workers. Just like PHP-FPM does.
If you already used PHP's parallel extension, then you should at least know the difference between thread and process instead of typing buzzwords, thinking it makes you look cool if you use them :)
I, for one, would love to be wrong about this and that FrankenPHP with all the other alternative runtimes actually brought benefits.
The apparent speedup comes from the fact it's not shared-nothing, meaning that objects from previous requests (and variables) are persisted and present in subsequent requests. This makes it work exactly like Node.js, removing the wonderful part of PHP which is that it automatically cleans up all the crap devs created and creates clean slate when next request is to be executed.
All of these "alternative" runtimes are false positives, because they're quick for first few requests but get slower and slower for the subsequent ones. Then, the workers are killed and restarted (precisely what PHP-FPM does too).
Since there's no new engine behind executing PHP, the only way FrankenPHP (and others) can yield any performance is when they're benchmarked against misconfigured PHP-FPM (opcache off, JIT off, persistent connections off).
It's not my cup of tea. I like that there are attempts at doing <something> but turning PHP execution model into Node.js execution model isn't the way to go.
I find it cheaper to throw a few bucks at stronger hardware compared to risking accurate execution to become flaky because shared-nothing is now unavailable.
This really isn't that hard, we're not trying to travel to Mars.
Anyone who is not capable of taking care of what you called footgun in a way where they automate - that person is not serious.
If there's a pretty huge problem - manage it. That's your job as programmer. If you're lazy, sloppy and prefer whining online over being proud of your work - there's no programming language that will take care of that for you.
What kind of logic is this, to blame the tool because you have no clue how to use it?
If I have to deal with files, I'll create a class and I'll combine functions file_exists, is_file, is_writable, file_get_contents, file_put_contents (and new fsync) in conjunction with stream_context_create. I can even get the errors that OS spits out and test for what exactly went wrong, but you obviously ignored that and gave up. I can tell you used the language sporadically, not professionally.
You're taking a small, localized issue that arose, while your job as programmer is to get around idiosyncrasies in programming languages with the focus on achieving the end goal.
I've a list of terrible things that PHP does but I have one for JS/TypeScript/Go/Rust/<you name it>.
My job is to know these and achieve goals, not to criticize languages because file handling in it is not the same as in C++ and language didn't fire up 50 AWS instances to spam X.com with messages in hopes that I somehow notice them.
Was that everything? You basically state there's a problem because you didn't use the function correctly and language didn't fall head over heels to stop you from doing silly things due to slopiness?
P.I.C.N.I.C.
You can, it's via `error_get_last()`. We've had that for 17 years..
It's hard to trust a stranger from internet claiming something, but we are in IT so it should be relatively trivial to prove your claims, right?
We had Firefox 0.3 which was very, very slow browser but still much better than Internet Explorer. There was a lot of mental gymnastics involved to get pages display at least similar for both browsers.
When Chrome 1 was released, it was absolutely awesome. Minimal interface. Focused on browsing. Incredibly fast, it just executed JS stupidly quick and we could create web app interfaces that didn't lag
You can still download Chrome 1 and see what it's about. It was basically what users wanted: supports more CSS features than other browsers, starts fast, executes JS fast, provides adequate developer console, renders pages correctly.
It took all of us by storm because it was genuinely good software. That era was the era of good software, not spam advertising.
Today, in 2023. this is not true any more and you are entirely correct when asking why people would use Chrome. Answer is: laziness, lack of info, apathy, lack of knowledge.
It doesn't mention any dependency on JS, there's pseudocode in Python to demonstrate generating/using the token.
> but some web apps use JS and sessionStorage on browser to store session token instead of using cookie
This is particularly strange, I've seen that frontend apps do this but I can't understand why because it's error prone and excellent attack vector. It boils down to emulating cookies, having to have some sort of request interceptor that includes the token on every XHR/fetch to serverside and another interceptor that saves updated token on every valid response from serverside. It seems like a misguided attempt to rectify problems that stem from CORS handling or shortsighted design where auth was bolted on as an afterthought.
And no, Postgres was never technologically superior. I'm sure this will spawn the debate where numerous proofs in form of blogs and "As a $big_title_that_makes_me_sound_legitimate", looking forward to seeing it.
My company's frontend team (comprised mostly of people who believe anything written) jumped the wagon on Bun.
After a few days of working with it, it turned out that Bun isn't really faster in real world scenarios.
This brings up the question - why market it as so much faster then?
Many frameworks and tools market themselves primarily as faster than $otherThing but it won't fix suboptimal code, wrong choices for data structures, silly things like "let's select * and sort in browser". When you remove those mistakes that bad devs make, it turns out node/deno are more than fast enough. What we need is less bloat, more engineering and no lazy development by "packagemanager install lib-that-could-do-my-work"
No. What I said was that language was not as relevant as the complete engineering ability that makes someone a valuable (financially viable) employee.
> but smart/good developers will find that CV/Salary pressures steers them away from PHP
I never met a person who entered world of IT with the criteria that you highlighted there. My recent experience shows that people enter IT/development based on salary alone, not based on research they conducted taking into account industry they'd work in, language features etc.
If this case you wrote of actually existed, world of software would be a place of much more high quality software and not of "it barely works" projects that resemble Frankenstein's monster.
It wasn't the language, it's everything around it. It's knowing frontend and how it works, it's knowing about cloud/operating systems, databases, 3rd party integration, IAM, SSO and the list goes on.
These skills are applicable everywhere, next to any language. Compensation I was offered revolved around the ability to be non-invasive towards younger teammates and to provide education with emphasis on critical thinking. During the years I've done this job, I learned other languages as well and I can safely claim that initial language one learns has huge impact but it's learning additional skills that makes up for a valuable employee.
In the end, knowing C# but not knowing PHP bears little insight into whether you're capable of listening about a requirement and coming up with a solution that satisfies the need, code it in such a way code can safely die one day and make in such a way that additional people in the team can jump in and manage it.
I also found a lot of job offers and opportunities. My previous engagement was insurtech/fintech, there's quite a bit of PHP used there (and it works well).
Wordpress, Magento, Facebook - these aren't the only places where PHP is/was used, the world we don't hear or read about is larger than the blogo-investo-googlesphere we're used to reading about.
No, the whole point of client-side rendering is to apply parasitic computing and offload the server by having the client perform work it can thus saving the bandwith and compute power.
Next benefit is application that's "snappy" and works well, which is what almost never happens sadly.
> that’s why you have JWTs and stuff like that.
No, you don't have JWT and "stuff like that" because of this. JWT is for offloading databases so you don't have to talk to a DB on every request since you can verify the token via signature check and thus implement distributed services that don't have to talk to central authority to authorize a request.
> where state is able to be maintained per user usually up by the same thread on the same physical server
And now you're trying to sound smart by adding servers and "threads". I've a feeling you're pulling my leg right now so I'll excuse myself since you started spouting absolute nonsense.
There's no attack surface here at all, the only issue with most client-side apps and interaction with server comes from CORS and devs copypasting solutions from SO to get rid of the warning, thus creating the attack surface.
The choices related to displaying appropriate elements based on current user's role that's tied to entire logic of the app has literally zero to do with security.
What was frustrating is that day in and day out, similar questions were asked - ones that are googleable.
One day I received a comment from such "user", under a question I answered and explained in detail. The "user" went to discredit me, without arguments or links and was pretty rude through all of the misspellings he did to avoid some automatic triggers. I replied rudely as well, asking him to read other people's answers before discrediting and providing no info.
Result was that I was sent to "cool off" for 2 weeks, and was given a speech from mod as if I was a child. At that point SO changed their ToS and claimed that all content was theirs, including answers I provided.
And that's where I departed from SO because from my experience - I was free debugging service for various agencies who went a little bit overboard with claims of their experience and in case someone was rude to me - I get no protection, however if I'm rude to "users" then I get slap on the wrist.
Working for free, being patronized, interacting with people who are too lazy to read - that were my reasons for abandoning SO.
Besides, when it started - all of the big questions about nearly every language were covered fast and there was very little to do except write SQL for other people and get praise for it as form of payment.
To indulge you, about good frameworks: Symfony, Aphiria. Aphiria in particular because it's small, cuts down on repetitive tasks and doesn't reinvent the language with things like "Macros" or abuse of Reflection or mishandled patterns like singletons - all of which Laravel gets wrong.
Symfony because of active development. Every large tool is bound to be bad at something. Symfony is no exception, however it's not an advertising platform - and Laravel is an advertising platform. Sane choice is to use the tool with maximum benefit and least negative impact.
I'm not sure what made you think it's an "appropriate" framework, it's literally antipattern on antipattern and it's not even the worst thing, neither is the fact it's 10x slower than anything else out there - what's worst is the blatant lying, bunch of security issues and using it as an advertising platform to push subpar services onto devs stuck with it.