Code Court: Episode I

Sara J
Sara J
Jul 30, 2017 · 2 min read

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.

  1. 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!
  2. I can execute many processes simultaneously, no threading necessary.
  3. Less syntax makes me easy to learn and fast to use.
  4. My developers can add on lots of libraries for slam-dunk functionality.
  5. 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:

  1. Until recently, C# could only be run on Windows machines. Even now, it has some catching up to do on Linux and Mac.
  2. 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;
  1. More syntax is more difficult to learn.
  2. 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.

  1. I am a compiled language. If a developer makes a syntax error, they discover it before runtime.
  2. I am a type-safe language. Never will I turn your number into a string!
  3. Thanks to all of my syntax, a developer can read my code and easily determine control flow.
  4. I am supported by the largest software company in the world.
  5. 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:

  1. JavaScript is not type-safe, so it may turn numbers into strings. If this means turning money into non-money, it’s a problem.
  2. Many people disable JavaScript due to its security flaws.
  3. 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.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade