Python for Decision Makers and Business Leaders Transcripts
Chapter: Python vs.
Lecture: Python vs. C#
0:00 First step into the ring is Python and C# and .NET.
0:04 We're going to take Python and compare it to C#
0:06 and the overall .NET ecosystem.
0:08 It just so happens I did professional .NET development
0:11 for I don't know, 12, 15 years
0:13 a very very long time actually.
0:15 And I still do a little bit of C# work
0:17 on our mobile apps.
0:19 So we're going to pick on .NET here.
0:21 This is probably a pretty good stand in for Java.
0:23 It's not exactly the same Java and .NET
0:26 are fairly good competitors.
0:28 They're kind of on equal footing
0:29 and in a lot of ways, no they're not the same
0:31 but they're similar.
0:32 So if you're also thinking about Java
0:34 this is probably the closest comparison you're going to get.
0:37 Lets put em side by side, go down some of the features
0:39 that I think are important and compare them.
0:42 Is .NET open source? Yes. Wait no. Yes sort of.
0:46 It turns out some parts of .NET are open source
0:49 some of them are not.
0:50 For example the main .NET Framework, I believe is not.
0:53 But something called .NET Core which is a newer version.
0:56 That's cross platform but doesn't do as much
0:59 is in fact open source.
1:00 ASP.NET is open source and so on.
1:03 So there's, some of it is, some it isn't
1:05 it's a bit of a mixed bag.
1:06 Python we've already seen straight across the board.
1:09 You can go to GitHub and just get it.
1:10 It's Open Source. Is it compiled?
1:13 Sometimes that's an advantage
1:15 sometimes that's a disadvantage.
1:16 .NET, yes its compiled and in further JIT compiled
1:20 Python is, not really.
1:22 Technically if you look at the internals
1:23 there's something that would look like compilation too.
1:25 But it is not in the sense that we're meaning here.
1:28 Is this technology owned and controlled by a company?
1:31 .NET, yes. Microsoft, Python, no.
1:35 There is the Python Software Foundation, the PSF.
1:38 They kind of sort of own it and control it.
1:40 But it's more like that's a legal structure in place
1:42 to be the steward of Python, not in the same sense that
1:46 you know a commercial entities using it as part
1:49 of their business.
1:50 Is there a strong base class library, or standard library?
1:53 Yes, .NET and Python both have incredible
1:55 base class libraries.
1:57 There's definitely one of those.
1:59 What about building web apps?
2:00 Are they good at that?
2:01 There, I would call that mostly a tie.
2:03 .NET has ASP.NET so not so much variety
2:06 but its really good at building web apps.
2:08 And Python, we've already seen.
2:10 There's so many options
2:11 its very good that Flask cap we built was great.
2:14 Any work with databases?
2:15 Yes, both of these have extremely strong support.
2:18 .NET has a new framework. Python has SQLAlchemy.
2:21 Those are actually very, very similar to each other.
2:23 And yeah, really great story there.
2:26 Mobile capabilities, .NET is actually extremely strong here.
2:29 And this is one of the places
2:31 where Python gets red mark on its record.
2:33 Python is actually very poor at building mobile apps.
2:36 Its not that its impossible its just very, very immature.
2:41 And well, lets just say its practically
2:44 not something you would choose.
2:46 On the other hand .NET has something called Xamerin
2:48 which allows you to write mobile applications
2:51 in .NET that work both on IOS and Android.
2:52 And that's what we use for our mobile apps.
2:55 Desktop applications, can you build those in .NET?
2:57 Yeah, there's a couple good options there.
2:59 WPF, its good at it
3:01 I just don't love the technology that much.
3:03 There's also Windows Forms that which is, pretty good.
3:06 Python it has Tkinter built in
3:09 that's kind of a old out of date mode.
3:11 Probably the best is Qt
3:13 that's a really great way to build apps.
3:15 But its not as well supported as .NET.
3:19 Get to its rank, this one Python definitely shines.
3:22 .NET is number 4 of the languages on Stack Overflow.
3:26 That's that graph I showed you
3:27 the incredible growth of Python.
3:29 At the beginning .NET is 4, Python number 1.
3:32 And, leaving the others in the dust.
3:34 TIOBE, another way that ranks the usage of languages.
3:38 I believe this one has kind of a longer tale affect
3:40 in the sense that stuff that was written 15 years ago
3:43 happen to be written in a language
3:45 that still counts towards this rank.
3:47 So its got a much slower leading edge
3:50 to to pick up the changes.
3:52 Anyway on the TIOBE programming language rank
3:55 we have 5 for .NET and 3 for Python.
3:57 And Python is going up there.
3:59 I believe .NET is, actually, as well.
4:02 Price, both of these are free.
4:03 You don't have to pay anybody, anything for them.
4:05 You can use .NET and the associated tooling
4:07 like Visual Studio Code or
4:09 Visual Studio Community edition for free.
4:11 Same thing, Python obviously depending on the tools you pick
4:14 you might buy a pay tool or not but yeah.
4:17 Python itself is absolutely free.
4:19 Another important distinction is
4:21 is this a general purpose programming language?
4:23 Some things, like R and Julia, Matlab
4:26 they are not general purposes languages.
4:28 You would never go and build YouTube in R.
4:32 But in this case .NET and Python are both
4:34 very much on par here and they are absolutely
4:36 general purpose programming languages.
4:38 Finally, the computing significa putting level.
4:41 This is the, Jupyter Notebook type of work
4:43 that we just explored earlier in the data science section.
4:46 Until very recently .NET would of gotten a fail here
4:49 I've got a poor.
4:50 And Python, would of course very, very strong
4:53 as it, continues to be.
4:54 But .NET now, recently added the capability
4:58 to have C# and F# type of code.
5:00 In Jupyter Notebooks, so in that, in my world
5:03 that brings them up a little bit.
5:05 But that does not bring in all these incredible libraries.
5:08 Like Astropy and 800 Biology libraries that we found on
5:13 PyPi that is still, I would believe
5:16 mostly missing in the .NET side.
5:17 So Python definitely wins here
5:19 but .NET is not as bad as some others.