Code Court: Episode I
Narrator:
In this episode of Code Court, prosecuting attorney Tina Tester will represent JavaScript, and defense attorney Devin Production will represent C#. Will the prosecution make its case? In which language would you code? Read this episode of Code Court!
(Queue theme song)
Narrator:
The prosecution presents the case for JavaScript.
Tina Tester:
Your honor, I’d like to call JavaScript to the stand.
(JavaScript settles in.)
JavaScript, tell us why developers everywhere should use you as a programming language?
JavaScript:
Thanks, Tina Tester. I’d be delighted to share my strengths and abilities with the court.
- I am the language that web browsers interpret, and therefore, I am universal. Developers can use me on the backend, too, and don’t have to learn a separate language!
- I can execute many processes simultaneously, no threading necessary.
- Less syntax makes me easy to learn and fast to use.
- My developers can add on lots of libraries for slam-dunk functionality.
- My code is interpreted client-side, not server-side, providing for a fast, streamlined user experience.
Tina Tester:
JavaScript, what would you say are the disadvantages to the defense, C#?
JavaScript:
My opinions are not the same as everyone’s, but C# has its downsides:
- Until recently, C# could only be run on Windows machines. Even now, it has some catching up to do on Linux and Mac.
- Who needs 11 types of numbers?
I have just one, and I declare it like this
var number = 0;or like this
let number = 0;- More syntax is more difficult to learn.
- Threads are necessary to scale applications.
Narrator:
The defense presents the case for C#.
Devin Production:
Your honor, I’d like to call C# to the stand.
(C# settles in.)
C#,tell us why developers should appreciate you as a programming language.
C#:
Thanks, Devin Production. I’d be happy to regale the court with my many advantages that developers can leverage.
- I am a compiled language. If a developer makes a syntax error, they discover it before runtime.
- I am a type-safe language. Never will I turn your number into a string!
- Thanks to all of my syntax, a developer can read my code and easily determine control flow.
- I am supported by the largest software company in the world.
- Thanks to this support, I have a feature-packed IDE.
Devin Production:
C#, what would you say are the disadvantages to the plaintiff, JavaScript?
C#:
My opinions are not the same as everyone’s, but they have formed over my past few years’ experience with JavaScript:
- JavaScript is not type-safe, so it may turn numbers into strings. If this means turning money into non-money, it’s a problem.
- Many people disable JavaScript due to its security flaws.
- Less syntax means control flow can be difficult.
Narrator:
The jury will consist of commenters to this blog post. The verdict will be presented on the next episode of Code Court.
