The BEST Backend Language for You | Prime Reacts
Vložit
- čas přidán 21. 12. 2023
- Recorded live on twitch, GET IN
/ theprimeagen
Become a backend engineer. Its my favorite site
boot.dev/?promo=PRIMEYT
This is also the best way to support me is to support yourself becoming a better backend engineer.
Reviewed video: • What is the BEST Backe...
By: / @conaticus
MY MAIN YT CHANNEL: Has well edited engineering videos
/ theprimeagen
Discord
/ discord
Have something for me to read or react to?: / theprimeagenreact
Kinesis Advantage 360: bit.ly/Prime-Kinesis
Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
turso.tech/deeznuts - Věda a technologie
We all know the best language for backend is JDSL. Tom's a genius!
oh no the ptsd
Praise Tom
Except the compile time, its almost as bad as rust
J DIESEL 🔥🔥
It's pronounced Jay Diesel, mmk?
I should stop watching Prime videos and start coding
We don’t need negativity like this in the comments
fr I've seen more prime videos than time spent coding, at least I learned something, (one day I will apply what I learned one day)
As a C# developer I can finally say I know something that prime doesn’t. Wow I’ve made it 😂
C# is honestly very good. But devs should use whatever tools they are the most familiar with to get things done.
It won because it was mediocre in every category lol
@ivanjermakov honestly, it is just mediocre in every but I feel like that is why it's so good. It doesn't have any real pain points when using it which makes it great.
Good front end language too, with Blazor WASM
C# has only gotten so much better, Web APIs dead simple, but love that they still support OOP/MVC architecture. Blazor is just a bonus!
Excel it is then...
Thank you for the reaction, loved it!
I wish you were more upfront about your experience with each language as you mentioned them, since that makes it feel more honest and less biased even if it is that
The question really is the same as with anything else. Use whatever programming language you feel more comfortable or master the best. Because in the end, most can do the same thing. Now, assuming you know all of them or can pick one, then you can certainly narrow it to specific things toward your project. The answer then depends on what kind of backend you are implementing. For example, if you are doing a backend for small IoT devices or memory is a concern, forget Node.js, it’s a memory pig, same is true for anything that requires Java. If security is a must, for example making stuff for network services or exposed online that need high performance, then Rust is probably your best option.
If you need something that will be distributed to Linux users or servers, most likely Python because it comes installed by default in most distros, while of course, if you know Go or Rust or C you can ship a compiled version anyway. If you need powerful feature - rich frameworks and need to develop fast while still having better performance than Python for web, PHP is probably the option. The same can be said for databases. You stick to what you master and stop trying to learn the latest JS framework that came up the last hour or the new programming language that everyone claims to be next X this replacement, and years later the same story starts again with something else...
I recently got back to C# after developing software with it back in 2014. It has come a long way. Especially the platform and tools support is so much better these days. Used to not like it, but now it feels smooth. It's not perfect, but what is? People like to use lots of abstraction and dependency injection is really on the overdrive. It might be a little overwhelming for newer developers at the start.
If I had to choose, I would probably still go with something like Golang, but I do not mind working with C#.
How long would it take to learn C# (dotnet frameworks). I actually love python and used it more than a year. But as you know it sucks when it comes to web dev. I love OO style of coding and there's good amount of C# jobs where I live.
@@rahatahmed3955 1 day
The Dependency Injection is out of control in C#. I hate it so much. I do like the language though.
As a student i can confirm that being thrown into an IoC container is confusing
@@ryanleemartin7758 it's really not that bad once you've adjusted to it. But jumping back and forth between it and a language like go does make it even more jarring and apparent.
Love the personality on top of the high knowledge shown.🤣🤣Wish I found this channel sooner.
I write Java every day and I do not mind it. Probably gonna start introducing Kotlin to our codebase soon.
I would bet that you won't go back to java once you've tried kotlin, at least that's how i felt. ^^
@DerOliDE I tried Kotlin, and saw how arrays arrays are initialized and never touched it again
@@DerOliDE I went from Java to Groovy and won't go back
Java paired with a great framework such as Quarkus is really effective. Immutability is still too verbose (please give us val=final+var, Brian), though. Errorprone+nullaway improve static analysis quite a bit. In the end, it's about the domain you are working in, the ecosystem around the language being supportive to said domain, an accessible knowledgebase and community, productive tooling,...
You can use Quarkus with kotlin tho. The thing is, Java can do most things kotlin does with help of external libraries, however it will always be painful
Coming from a front end background, C# has been my goto for backend related things. Also agreed on c# as its commonly used for Microsoft stack as well with SQL. I would say javascript front end c# web api backend are my favorites :)
C# ties in very well with JS/TS, because of the interops. Either by using the Blazor's JS interop, or by using SignalR and not using any C# in frontend
@nocturne6320 agreed but I've being working with react and c# mvc structure and it's great as a SPA. C# for front end is a horrible idea lol
@@andrewnleon C# for web frontend will be great once they fix loading times for WASM Blazor, currently it takes incredibly long. As for native, theres a mess in UI frameworks, MAUI is not fully crossplatform and Avalonia is the only UI framework that supports everything from Windows, trough Mac/IOs to WASM, but it has the xaml layout, which I despise from working with WPF
@@nocturne6320 i totally understand those stress points and they have not been fixed since 4.8 framework so yeah i droped them as my go to for front end development. Its like a hybrid approach and it is complicated and a crap load of overhead, coming from a WPF background. Now that iv lean C# web api its just makes more sense to me for a backend only.
Node for MVP, C# for scaling in prod?
All aside, i revisited the language Unison. There seems to be an exotic solution for a lack of community. Basically they can detect by hashing whether previous developers have used/coded similar functions/types, and you can get some cues for how to code/find relevant informations. Just speculating.
Would love to learn Unison!
3:42 but does jest by default start a thread for every test suite (files)? so the 2 test will only use 2 cores if they are in different files? But to can use up to 90% of the cores based on how many suites you are running, btw I run my 250 teat suites in a VM with 100 vcores. And my memory goes to 80+GB ram lol I had to bump the ram to 125GB cause I was getting `node out of memory` erros lol
PHP ecosystem is 10/10.
All the things needed to build a website is already there. I still remember at 2020 when I was searching a HTML to PDF library for nodejs and cant find anything that works.
I'd say pretty much same for the Python ecosystem, 10/10
Node's problem is there's 50+ packages for everything and none of them work even half decent, are abandoned, or entirely break when updating them every time.
@@ITSecNEOPHP has type hints.
Did you watch video , PHP allegedly outperforms C in file reading?
@@ITSecNEO Nobody said that an ecosystem is just the packages available, but it is part of it. And to be clear, nobody said anything good about Node, we were talking shit on it. But guess you're right we should only use C and Rust for our web backends I guess.
@@ITSecNEO from a pentester/security perspective I can see why that'd be your ideal future but idk if I buy startups rushing to build their MVP backends in rust, just saying, at least not until there are more powerful, stable, battletested frameworks akin to Django, Laravel, Rails etc.
I can't speak for PHP as I've never really used it professionally, but python's dependency issues are nowhere near node's dependency issues. And not sure what your specific gripe is with virtual envs.
@@ITSecNEO czcams.com/video/kmMXGnK6F0k/video.htmlsi=xhva1sMtJ_I81Ong
C# is amazing. You never have to worry about learning new frameworks and all the bullshit. It's way more community driven than Java. You can easily find "the best way" to do something. Most other Lang's are convoluted at some point.
True, people often complain about how there are too many ways of doing stuff in C# (which is mainly for backward compatibility), but most of the time you can find the currently recommended way of doing things
I think it still gets bad rep from being windows only back in the day, same as php is still considered a bad language by some to this day, even though most of the problems with it are fixed now. I wish more people gave it a try, it is easier than ever to start, with all the changes Microsoft is doing to boilerplate!
hello i'm new into dev, i know html/css/js and React -> Can i go easily for C# or PhP or it's better to go NodeJs and framework for js-backend@@eugenevakulenko4229
19:50 clap and serde are the main reason i used rust to develop my companies main internal CLI. I doubt id write a CLI in any other language now
I'm biased, but that C# overall is what i feel most C# developers perceive it at.I'd never for example choose C# over Python to do ML work, but OVERALL, while C# isn't A+ in anything, it's a solid A-/B+ in just about everything. Most issues i have with C# isn't about C# itself, but with Visual Studio (don't get me started) and how much of a mess they made up with framework/standard/core/whatnot (it's stabilizing though).
p.s. the 12:00 thing in C# is called Extension methods. It's just a static method in a static class that takes (this type something) in. And then you can do sometypeinstance.someextensionmethod(), but you still don't have access to the internal/private members of sometype. It's great to "extend" a class without sub-classing it, and it's the only way to add anything to a sealed.
I love using this to add methods to enums
I'm lucky enough to be working on green field projects in C# and the experience and tooling is good enough that Visual Studio is pretty much optional now. Neovim btw.
@@fluffydoggojust curious: why would you want to add methods to enums?
@@semyaza555 dont know how well links work in comments, but this is a particular example where I added extension methods to get rid of tedious flag checks.
(CZcams did not like my link)
In that code, using the extension method IsNumericInteger is a lot more maintainable than a if (value >= OptionType.Int8 && value
Kotlin has this as well.
C# probably has one of the best standard libraries. If I must have a web dev job, it will be in C#. Ideally, I'd be writing C and C++.
Can’t have ecosystem issues if you rarely need to look outside of the standard library
**taps forehead**
C# standard libraries don’t even have named string interpolation
@@rodrigosantacruzortega8890 uh I’m pretty sure it does. Could you provide an example of what your talking about.
I.e you can do:
string test = “World”;
Console.WriteLine($“Hello {test}”);
It’s been able to do this since like 2016 or 2017
@@rodrigosantacruzortega8890ermmm
@rodrigosantacruzortega8890 modern day we can do $"{variableName} for this" but I hate seeing some of the old code bases
I think Rust attracts VERY good developers and that's why you end up with THE PACKAGE FOR X. But anyone can throw together a package for python and you end up with vastly different levels of quality from package to package.
Hey! Decided to try Harpoon. Am I correct that this feature is mostly VIM markers? Probably I am missing something, so correct me if I am wrong.
With markers you even can go to the specific line.
To be honest I find the rust developer experience really good which I attribute a lot to cargo, a great type system and rust analyser.
they should have called it "how fast a beginner can write small python scripts in it" and not "developer experience", the fact that JS and Python are at the top is hilarious. Java is put above Rust too lmao
I've worked on some C# codebases for more than 5 years -- some of which are more than a decade old -- and in my experience they become a mess over time. For my developer experience, I value the health of a codebase over time more than just about anything else.
The newer versions are a lot better, and I'd guess that F# helps, but I've only watched some YT videos about it.
Awesome video dude. Your candor in this one made me sub to you, and ya had me laughing hard, too. 10/10
I work on a large F# codebase. Whilst I love the language and it's a genuine joy to work with, I don't think there's any language that can completely eliminate the mess that naturally comes with large codebases.
I guess you worked on some older versions, most likely based on the .NET Framework
Web framework had a long path of evolution and .NET 8 is awesome nowadays, I would even say it's the most feature-rich yet fast and flexible web framework out there amongst the backend languages. Give it a try ;)
I think a messy codebase is more about skill issues, not the language itself. Many new architectural designs have become popular recently, and all projects that I saw following these rules are pretty good. Also, there are a lot of best practices from Microsoft or the community that are shared to make the code consistent and better looking.
@@volan4ik. These are great points. There are still a few patterns that seem expected (though hopefully outdated, as you say) like needing to define empty models/objects to meet some conventional pattern. I see the same thing in PHP and Java -- it's more of a gripe with OOP.
But I'll keep an open mind with the newer versions. I respect .NET a _ton_.
It becomes a mess? Elaborate please. It’s more likely a mess because of the person writing it. Java very similar language so similar outcome.
@@nan5715 Yeah, I hear ya. I wouldn't call myself an expert at these languages, so it's hard for me to have a super great take on my co-workers' code. It's probably a little of all of these things.
The one that solves the most problems for you and makes you the most money. xD
I grew up working with PHP and WordPress, professionally I use a C# and Blazor framework stack for my project in a defense company (I love it, feels so smooth, agile, modular, extensible, and robust). I wanted to get more into Python, currently have limited experience with it. I would say if it's strictly web based, PHP or Python but if it's an application that'll be distributed across mobile devices then C# or Java for their massive standard libraries and scalability (C# since I'm gaining a lot of experience in it).
I love how you look happy and totally sane in the thumbnail :)
@ThePrimeTime After using expressive languages, like Rust, aren't you annoyed with all those flaws in Go design - poor expressiveness (no expressions, statements only); lack of first-class support for your collections (you can't use make() or for .. range for your own-created collections); and half-implemented language abstractions with ends "sticking out" (like when you have to care about new reference returned from append(), when mass of other languages just care of such things on its own)?..
Started my dev life with js and php, later java, since 7-8 years c# (web api, net core) and lots of python now for ai dev. And I must say that since c# is more open, it is for me the most pleasant experience while developing the backend. It feels now like a complete language and toolset to do what you need to do (entity framework, mass transit etc), performance, debugging, naming of buildit methods and code structure just seems right.
That said it's still missing some support for things you can easily achieve in python or js (not a big fan of js overall). I think every language has some purpose (maybe good for prototyping or working with files, some better for large datasets etc)
Love your channel! Try c#
Can someone tell me what extension he uses to be able to see his tabs when he hovers his mouse over in full screen - 26:12 ?
Unless I'm misunderstanding something, the only real difference between Go's channels and that of Rust is that Rust separates sender and the receiver. Both seem work the same way otherwise though, right? I suppose what works different is Rust's and Go's approaches to concurrency in general but that's a different question
I'm not sure what you mean by Rust separating sender and receiver, but Go channels can be typed to be receive-only or send-only
@@chigozie123 I mean that the sender and receiver endpoints are stored in two separate variables in Rust, as opposed to just one in Go. What you're referring to I'm assuming is just specifying directionality of a channel in function/method signatures and such? Still, when declared the channel variable is bidirectional in Go
@@aarholodiana lot of things using Go channels won’t translate directly into rust, especially because of ownership. Multiple receivers, global channels, advanced select statements aren’t really translatable Tokio rust. Not to mention Golang channels don’t add function coloring.
I wasn’t expecting a meme building masterclass
For a software developer, which is more addicting?
1 - Smoking crack
2 - Programming in Rust
I knew it, these freaking programmers are junkies
@@paulanthonyarriola6402 Rust: Not even once... 😂
Coffe
3. Arguing that people should program in Rust
@@pauldraper1736 I agree, specially:
"Did you know that the vast majority of security vulnerabilities in C and C++ are memory bugs?"
To answer Prime at 16:42 yeah the guy is British (from the South of England more specifically) and we do pronounce innovative that way.
He's more likely to be Australian with that accent. Although it's not a strong accent so he could be an aussie living in the UK or vice versa.
Dude is clearly Aussie. You must be high
At my current job I need over 8GB to run eslint and over 8GB to build an angular app and somehow no one thinks this is insane. I feel like Jackie Chan with my hand up in confusion and frustration. What is going on?
Massive kool-aid addiction.
How do you edit in gimp with the keyboard?
Funny how it's never the artist but the tools that are the problem 🤔
Note as you mentioned that you like to just "attach" methods / functions to types in GO, C# has extension methods which allows pretty much the same thing, though not as easy / inline as in GO. In C# extension methods have to be in a static class.
public static class IntExt
{
public static int Add(this int a, int b)
{
return a + b;
}
}
// With that you can do
int a = 5.Add(7).Add(3);
// which is a complicated way to write
int a = 5 + 7 + 3;
// or
int a = 15;
// :P
The magic word is the "this" at the first argument which makes this method an extension method. This is a pure compiler feature. So the actual code of course just calls that static method accordingly. So the example above essentially does
int a = IntExt.Add( IntExt.Add(5, 7), 3 );
C#'s standard library can throw a pitch black shade even on Tom(and he's a genius btw if you didn't know).
Love this video, guess the big takeaway here is to write in the language of your choosing i guess... But according to you prime, what would you choice be? If you were to advise some ody like myself with a background in PHP, havent coded in over 5years and looking at getting back into it... Advise from anyone reading this will be appreciated
hello i'm new into dev, i know html/css/js and React -> Can i go easily for C# or PhP or it's better to go NodeJs and framework for js-backend
Devs here are hating on C# and Microsoft, but forget that Typescript was made by Microsoft based on C# and its type system.
Typescript was also a precursor to test open-source before C# also became open-source.
Typescript type system has NOTHING to do with C# types. Typescript uses JavaScript types (string, number, NaN, null, undefined, etc) C# uses more classical C/C++ like typing.
I only started to use JavaScript because of VSCode intellisense being similar to C# with Visual Studio
If I had to use JavaScript and VSCode didn't exist I would never use
For anyone programming in C# - do you use VSCode? Or only VS/Rider/other "full fledged" IDE?
I'm trying to enjoy it using VSCode (don't tell primeagen) but the official extensions seems very rough around the edges.
Don't use it much, but when I do, VS Code gets the job done. I'm on Ubuntu anyways. But I think if you're developing games, Rider takes the cake.
I use C# professionally and the tools for that are Visual Studio Code (with OmnisharP) + Rider. Many of my acquaintances use just Rider but I prefer VSC for its snappiness and being battery friendly, with Rider serving as an escape hatch when I want to step through decompiled third-party code or do advanced profiling.
One extension to use with VSC is Roslynator which, for some reason, works better than in plain VS.
Rider or full fat Visual Studio.
OmniSharp ruins VS Code. It’s terrible.
Rider is a lot cheaper than VS, and it runs on Linux, so it’s what I use when doing C# work. Rider also “looks” the best, at least imo.
I used to use VS though, and there really aren’t any IDEs as good as VS for all of the minutiae it provides.
Rider let’s gooo
I much prefer Rider, but sometimes it is a requirement to use VS on the project, which has plenty of powerful features out of the box, but overall pretty janky, I haven’t had a week when I didn’t need to restart VS because of some issue. I’ve also tried VSC, and it’s very convenient to be able to customise it so well, but sooner or later I would run into something that’s very uncomfortable to use compared to full-fledged IDE’s and community libraries aren’t on the same level as them.
if you have a complex business backend elixir is the best because of the beam. if you know you know, if you don't know, you have no idea what you're missing.
Middle English is quite a language. Chaucer's Canterbury Tales are a great read.
btw that thing you liked in Go where you can add custom methods to objects is what we call "prototype pollution" in JS and did that a lot in early jQuery times...
Yeah, great times lol
no it's not. that's polluting global objects vs putting methods on your own custom types
@@ThePandaGuitar he was specifically talking about adding custom methods to existing builtin objects which is the definition of "prototype pollution" in JS.
And it does not event matter if it's builtin objects or some other 3rd party library - it is all the same pollution and carries the same issues.You should never do it on the objects that you do not control, but then if you control your objects it makes zero sense to do it anyway so....
so with vim you can instantly compile the languages inside the editor and get a result in next line ?
12:05 I love that feature too. It's so simple yet powerful.
Let’s goooooooooooo c#… just bear in mind how much better C# is now compared to 5 years ago, it really has come on in leaps and bounds
Its not that different to how it was 5 years ago
Source: I have been doing professional C# development approaching 20 years.
I agree that modern .NET Core applications with minimal APIs, EF & Linq have a decent developer experience. It was great when they cleaned up with .NET Core. However, the language itself is extremely bloated with features. In order to reduce boilerplate they add more and more keywords and syntax. It becomes extremely bothersome for many teams. Sure, primary constructors are fancy, but at this point u can make a 10 hour course just about correct object initialization. It's a mess.
@@sacredgeometry it really is if you care about cross-platform stuff and the massive improvements to the build system.
Source: I’m a tech lead of a large software company where all of our stuff is in C#
Agreed the language bloat is getting on my tits. Too many cooks.
But is it as easy as installing Mode or Go and just getting started?
12:12 You can do that with C# extension methods too!
Which vim colorscheme do you use?
JS developer experience 10/10 KEKW. Watch tsoding trying to create a minimal React application in 2 hours, without installing Next.js, Babel and other crap.
Oh my goodness it was so great watching the chat of all the react “developers” losing their mind over it too…
I feel bad for them, if only they knew how web development worked before all of this mess…
It's just a lie that Ruby has a lack of community support and a poor development experience. In the first aspect, although the Ruby community is small it is very active, in the second aspect Ruby is simply superior to all other languages. It's the only language that people say is fucking beautiful. It's a pleasure to write in.
Ruby is a very enjoyable language to get something done quickly, and it lends itself very well to DSLs because the everything-is-an-object design means you can make the language do backflips. The problem is complexity and scale. Large projects require a lot of discipline with Ruby, and it doesn't do so well at parallelism. That's why so many Ruby devs (including myself) have jumped ship to Elixir, which sacrifices a little of that dynamic language backflips functionality for better clarity, less surprise, and a ton of scalability. And it's still really fun to work in 😊
I took it very personally when you said its not about you ;)
PS: I rarely comment on youtube videos, the last time I commented was some Java video a couple of years ago.
9:40 Channels are from Occam, but Plan 9 from Bell Labs had Alef, which was a language for a while, but then they just started using channels from C. After Plan 9, Inferno had Limbo, which is probably shares the most ideas with Go, but the Go compler itself evolved from the Plan 9 C compiler.
Rust channels not being a part of the language is actually a good thing. There are quite a few tradeoffs made when implementing a channel, and having them in the library means that as new tradeoffs are discovered, which happens often, they can be exploited or mitgated through new libraries rather than language changes, which takes much longer than a library release.
Just started watching, my expectations are high, I want to become and backend engineering, so I hope I get some good answers.
As a begginer, which labguage do you suggest i learn. I know js already. I want to add a second lang
Im not prime but I would master one language as much as humanly possible. Choose any that peaks your interest.
Have you graduated to Typescript yet? If not, that was be the quickest next step.
C# or Go.
Don’t touch any of the dynamically typed languages and you will be good
@@Bourn77 i've heard of opinion that Golang is bad for beginners, because you need many prerequisites to use this language appropriately that you can get more easily learning backend dev on other languages like PHP, Python or Java. So, you're supposed to learn Java/PHP/Python first and then, if you want, switch to Golang. If it's wrong, could you please explain why
"Security is a skill issue" I'm stealing that quote, thank you!
Ruby is pretty neat and nice, has a pretty decent community and a very good developer experience.
Just fully disagree on PHPs rankings entirely in that graph. It still gets so much employability, people are constantly looking for PHP devs and it ranking last on Security stinks of Wordpress plugin exploit driven mindset.
I just read that a Typescript program can compile without type errors, yet still have runtime type errors.
Does anyone know if JSDoc is better in this regard?
Nope, due to JavaScript being inherently non-typed (more specifically, dynamic as opposed to statically typed). You need 3rd party libraries (Zod, Typebox, etc) for runtime type safety. Since TS transpiles into JS, it suffers from this very issue too
JSDocs only provide type info (and I think were an inspiration for TypeScript, but I could be wrong). Either way, you're likely better off using TypeScript + runtime validation 👍🏻
It's an unavoidable part of using javascript, even if you are using it with typescript. The thing that helps the most is giving everything proper types, and almost never using any. If you are interacting with an api and you dont have types for the return value already, create an interface or something. The more thorough and accurate you are with the typescript definitions, the less problems you will have at rumtime. A lot of people just give everything the any type, do lazy workarounds to get around type errors, and then complain when they get runtime errors.
If you are getting lots of these types of errors using typescript then you are using it wrong.
@@boscodomingoactually u can do runtime checks with native JS
PHP's linear execution speed is pretty fast (not sure if it's quite C# level, but probably not far off). The problem is the code re-execution. A C# webserver does its init, then starts a (e)select/epoll service and handles requests. PHP starts a whole new PHP process per request handled by nginx. Yes, I know PHP _can_ now use the epoll API, but the fact is production code for PHP _doesn't_ use the high performance options. This is why globals in php aren't a problem, because the whole program will exit when the request finishes. It also means you _must_ cache heavily or nothing works well.
Technically, most PHP in the wild is using FastCGI or FPM or Apache module, and none of these SAPIs spawn a new process per request. Not on an OS level that is.
But if you mean "process" as in "scope", then yeah... every request has its own scope, and there's no way to have connections in a global shared scope. Data can be shared across requests with things like APCu, but other than with an Apache module, you have no guarantees how long that data is globally available, hence why it is mostly useful as a cache.
If anybody cared about performance they would be using Lua
@@boenrobot I haven't examined the internals of PHP+apache or nginx in a while, the only PHP I have in production is behind a conventional CGI interface, so is a fully new process per request. Regardless, the cost of spawning a new OS-level process is fairly small compared to the cost of re-parsing all of the source code and re-running everything. Unless I am misunderstanding you and modern PHP doesn't have to re-do the parsing and function/global evaluation on each request now?
It wouldn't be too hard to take advantage of memory-COW to do all of the top level parsing and then wait for the request to come in and fork at that point, I think I encountered that in an old perl server years ago.
Regardless, without being able to juggle multiple requests per thread at once, it's not going to keep up with a proper epoll implementation in a reasonably fast language.
@yellingintothewind Yes, modern PHP doesn't need to re-parse all of the source code either. It uses what PHP calls "Opcache", which is enabled by default. The PHP process basically watches the files for changes, and prunes the opcache entry on modifications. There's also functions for forcing a removal of a cache entry.
Of course, with CGI, this is pointless, since the PHP process doesn't persist, but with FastCGI, FPM and Apache module, it does.
Most usages of PHP and Nginx I've seen use FastCGI, not CGI... In fact, I can't find docs about setting up PHP with CGI on Nginx.
@@boenrobot Assuming that opcache means a cache of the opcodes, rather than at the AST level (which would probably be called an astcache), that means it also doesn't need to recreate the functions and what not, since they _are_ their opcodes. Or at least trivially close enough to that to remove almost all the cost of restarting.
Dumping the cache when files change will generally be the right call, since that makes the existence of the cache transparent to the normal developer. It _does_ mean upgrading production while letting existing clients keep using the old version for the current session is essentially impossible (or at least much more complex than just starting a new epoll server on the same port and letting the old one keep running till the last client drops off). Still, generally going to be the right call there.
The CGI service I have running is slaved to an epoll server, just need an endpoint to interact with some _old_ code. Performance doesn't really matter in this case, so I haven't looked for an alternative to basic CGI. Last time I messed with fastcgi or similar would have been 2009 or thereabouts.
Meme engineering done at the end was a masterpiece. Python in shambles.
True, it's really Laravel that I enjoy working with, PHP is neat, but that's it
Fun fact $ is how you declare variables because the language wants to remind you what you will make if you use it.
@@koy540 fr though, I've seen so many PHP devs making some real 💵💰 with it
Django is really good, from a business perspective it completely changed the game for my company. Despite Python not being the most performant language, it is still fantastic to develop in.
It does have a use case. If you have a lot of basic CRUD endpoints, Django takes the cake in getting them done fast.
@@OzzyTheGiant I would put the admin panel above CRUD personally. Honestly can’t imagine ever building a product without it.
bro I like the way you type.... its 🔥🔥🔥🔥
Even if he's being offensive and keep insulting the programming language of your choice, simply you can not hate the primeagen, because you can feel how deeply honest and objective he is 🙋♂️
13:50 it's probably using c as pass by value only
I also say “innuvitiv” because it’s easier to say “innovative”.
I also question the guy’s list that Ruby is ranked last in dev exp, ecosystem. I mean, maybe he’s using Ruby in the backend without Rails?
it kinda looks like the guy doesn't know anything about Ruby. Worse dev experience than PhP, C# and Java??
Security also is questionable, Rails by default is pretty damn secure. If plain ruby, I guess no static typing so all the hate by default, but hey, Sorbet exists. Also last in ecosystem and community with go and rust above, not convinced. Scalability, there's no big difference with python.
is JavaScript worth learning . I want to do web design .is it necessary can u use python . I am total Noob .so take it easy if i say something dumb.
Yeah JavaScript is worth learning. You can only use python on the backend
No Elixir😮
Spring Boot - The Most Advanced_Useful_Effective Backend Framework...
"CLAP is the reason why I do cli applications in Rust"
This is the exact reason why I introduced Rust into our tech stack. I use Go for backend servers but CLAP just makes cli tools so easy its hard not to use Rust in those cases.
Love that cool little bash tool 'vmrss' !
Fun fact - the spelling of Django is from French to spell sounds they don't have like the J and CH as pronounced in English. Which is why they spell Jakarta as Djakarta - similar to Chad (the country) being spelled as Tchad.
Is Go viable for statistics Like R?
i went from c++ to java to now scala for big data applications, i am not turning back, not even the eyes
For Pythonists:
I'm studying some code but I'm at the very beginning, so this question might be a little silly.
I always see here and there people saying that loops in Python are really bad.
So from a Pythonist's perspective, are they really that bad? Are there people contributing to the project who are trying or have tried to do something about it?
Thanks!
I'm not a Python developer, but I think there are implementations of Cython loops using additional C libraries and additional steps to increase Python loop speed by up to 700 times. This also hints a little at how bad loops are in Python.
Because python reads the code line by line and converts it to bytecode it takes time to do that conversion. With list comprehension you can do iterations much faster because it converts it to C or something like that and doesn't have to convert it to bytecode. Not a python expert but I've used it a bit and I remember I heard it somewhere (don't know where exactly)
Python loops are slow because of the very dynamic nature of the language. When you for-looping over an object, the interpreter gets the iterator of that (calling __iter__) and starts calling __next__ method of this iterator. What can be in that __next__ method? Anything. You can define it however you want, as practically any other behavior of an object. This makes it almost impossible to optimize loops. On the other hand, this freedom makes Python a whole framework for building interfaces for low-level libs, which Python's ecosystem has in plenty.
In practice, if you need speed, depending on the use case, you wanna look at: numpy for operations with vectors, numba for further optimization (it compiles your Python/numpy function into machine code with LLVM, parallelising over multiple cores), pandas for tabular data, PyTorch and Tensorflow for ML stuff and general work with tensors, automatic differentiation, etc. All these options either use C/C++ loops, or the GPU processing power. They're all highly optimized, supported by the best engineers in the field, and very fast.
I mainly do mathematical tasks with Python, but I use SageMath, SymPy, or NumPy instead of raw Python.
Python is a decent scripting language, but worse than Ruby or Perl at that. Python is ok at doing math/stats, but R is signifcantly easier and more intuitive for people coming from a scientific background.
However, Python is the best interface into C/Fortran libraries that do the bulk of complex computations. It is very easy to learn, lends itself well as an educational tool, and has established itself as the most common denominator for everything Data. Its 'good enough' nature makes it one of the universal tools in SE, next to JS for web-development and C for systems..
I love how he says the phrase "unbiased information on these languages" with a screenshot of Laravel up on the b-roll.
Laravel is the only thing that makes php desireable, but thats anything but unbiased to imply it represents the entire language.
Anyone who claims to be unbiased on any topic is either disingenuous or ignorant.
mate your audio is bit low. was watching your stream with theo and even there I noticed your audio level is low
What CPU has 11 cores??? I wasn’t aware any CPUs offered odd numbers since we went from 1-core to 2.
apparently in some AMD CPUs let's say the CPU was supposed to be 8 cores but it came out of the fab with only 7 cores working they would turn off one core and sell it as a 6 core CPU you can still unlock that extra core and it would work. I doubt that's what's going on here though.
Maybe a VM
14” MacBook Pro with M3 Pro has 11 cores
C# honestly deserves the #1 spot. It's by no means best in any single category, but it's easily among the best in all of them.
ALL HAIL C#
Frequent referring to useless micro benchmarks & the TIOBE index is telling you that somebody has no idea what he is talking about.
true... the only time a langauge it self has become a bottleneck in performace usually means you are making enough revenue to now do a complete rearchitecture
Prime is on his C# arc. It's time bois.
12:30 Prime, are you okay with the ability to add functions to a prototype in JS? It seems like the same thing but without classes
13:50, if I had to guess it's not a skill issue it's a jit issue (java is jit compiled)
💯on the intro!!
I think by ecosystem and community he as just referring to the size of them or the number of packages available. I think how you rank them determines on your definition. It would probably be different if the definition was who had the best community/ecosystem but then that is also really subjective.
As a university student, I really liked Java for simple apps. But then I had to build a REST API using Spring. Even with all the help of JPA, Lombok, MapStruct and the likes, it was a terrible experience. It felt so unnecessarily clunky and verbose and the dependency hell was real. I can't believe I actually had a better time creating a REST API using vanilla PHP, doing all the REST endpoint parsing by hand.
But don't you think Java with Spring is used more widely than php?
@@sambhavmishra5423 Well, I taught myself how to do it, I had no lectures or anything about it, so it's possible I didn't do something properly. And it's true that Spring is very popular. But the popularity of a technology doesn't necessarily mean it's the best. Take Python as an example. It's the most popular language at present, but it's absolutely inferior to every single popular language in any regard. It doesn't excel at anything and isn't even a jack of all trades. Yet, it's the most popular language out there.
Having made games and I work for the government, C# is better than a lot of people think. That said, I prefer F#.
F# is an awesome functional language totally agree.
12:08 we here in c# land call it: extension methods
Oh my goodness, I love that about it C#
Class doesn’t have a method you want?
Just write it yourself and stick it in there!
I’ve written so many extensions to System.String… and other libraries I use often.
So very convenient…
i was gonna leave until prime started making one of the hardest images of all time
I guess working with LightyearLongPascalNames shoehorned into classes by Allman is pleasant somehow :)
Much as I like a good debate over which language does what better, in the end there are only two types of programming languages: The ones everyone complains about, and the ones no one uses.
We use Java at work and I constantly wish we were using C#. You just can't beat LINQ and C# just has dramatically less boiler plate and isn't as dependent on package structure and configuration BS that Java requires. Maybe this is a lack of knowledge on my part but Java has some really annoying things about it.
4:15 did i just hear yayayayaya, okay now we can call you doc prime
17:10 there wasn't a "true english spoken for a millennia" older forms of english were spoken with many different accents. We know this for a fact because english writing used to be phonetics based, so people with different accents would spell words differently. Not to mention that the language changed a lot over the years with many different foreign influences and regional differences.
Using command line parsers on node means getting a dependabot notification in 3, 2, 1....
I think PHP should score a lot higher in ecosystem and community. Personally I think it is better than both Python and Javascript, especially for backend web development. The ecosystems for Symfony and Laravel are pretty great. And you also have the ecosystem around WordPress. The developer experience is also pretty great if you use a modern framework like PHP or Symfony. I think it is better than Node/Typescript for the most part.
PHP is also on par or faster than Java and C# in most cases. Especially with modern runtimes like Swoole or FrankenPHP. Those also gives great multi thread support.
Yes, I'm a PHP dev, but I have also been using Node and Python quite a lot, and also some Go and Java.
I'm annoyed that nobody ever talks about Julia in this conversation. It has a beautiful module system, insane performance, incredibly simple data structures, the effing Genie framework which is a marvel of engineering and a joy to work with, JS interop capabilities, and the ability to compile to LLVM bytecode or assembly as well as platform-native binaries. Oh, and the CLI arguments following the name of a Julia file when you run it on the console are just passed in as a constant called ARGS as a default language feature. Fight me about it.
@ITSecNEO Tbh, I think it has a lot of advantages over python in terms of both syntactical comfort for people used to Python (or even Go for that matter) and in terms of data structure stability. Their type system is just plain sensible, and their frameworks are smooth as butter. Ecosystem is ripe for further development in my opinion. I've spent about 2 months casually with the language total over the course of a year or so, but it has me looking for excuses to use it professionally.
@ITSecNEO I'd say actually try it. Doesn't feel niche to me at all. Can't think of much in the web space I couldn't do with it just as or more easily than wrangling the necessary javascript packages to accomplish the same thing.
C can be slower than Java, because Java not only cache translated code in runtime (effectively like C after warmup) but also can optimize code in runtime, which C just can not do due to it's nature.
The best part of the video is the meme gold creation
hehe tried to read the reactions on xitter, but the post is not online anymore