8. How do I choose a Programming Language for a project?#

Today we’ll explore how programming languages are cateogrized. Along the way, this will expose what core, generic features of a programming language are.

The key takeaway that I want for your is to have intution for how to choose a language for a project, not only your favorite, but what is the best for different types of projects.

8.1. Admin#

This is a posted class with opportunities for Experience, Review, and Practice badges. The practice badge also has ideas in it for an explore badge.

This is a fully asynchronous activity that you can complete alone and has options for how to dicuss it with classmates. You can choose either version.

Important

Future classes do not directly build on top of steps in this activity so this can be made up later without putting you behind.

8.2. Set up for credit#

Start your experience badge at the start of working on this activity and then you can add your work to it throughout.

You may work alone or with classmates.

Important

Use the makeup workflow with an ISO formated date (YYYY-MM-DD).

Important

This PR should auto-request @brownsarahm; do not change it

8.3. Comparing languages you know#

Tak a few minutes on your own to fill in the follwing table for two languages of your own. Replace the <langugage> with two languages that you are familiar with. Add two additional rows. You can do this by memory, or by looking up/discussing. If you look things up, be sure to use reputable sources and include links to them.

| feature | <language> | <language></language> |
| ------ | ------ | ------ |
| use of whitespace     | Text     | Text     |
| list/array types |   | |
| variable typing |  | | 
| memory usage | | | 

Post your table on GitHub in the language comparisons discussion](orgs/compsys-progtools#10). Reply to at least two peers offering either advice or asking additional questions.

Note

Link to your post and comments in your experience PR

8.4. Learn more#

Skim through these resources:

While you read look for the following key points:

  • What other properties besides the syntax and efficiency criteria above can you use to compare programming languages

  • how do types vs paradigms compare as ways to categorize languages

  • how do interpretation and compilation compare?

8.5. PL in Developer Survey#

Read Carefully the developer survey// languages section for 2023 (2024 will not occur until late spring/early summer)

Include answers to the following questions in your experience report for today. You may work with classmates and use additional sources to find answers to these questions. If they are not basic facts about the langague (eg compiled vs interpretted; open source vs not; libarary ecosystem) include links to where you found the information.

  • what is surprising?

  • what did you expect?

  • what do the popular languages have in common?

  • what do the dreaded languages have in common?

  • How are popular vs dreaded languages different? What features might be the cause for making a language dreaded?

  • How to used languages differ from less commonly used languages? What features might be the cause for making a languge popular?

  • How have things changed over the years of the survey?

8.6. Prepare for next class#

No additional preparation,the prep for 2024-02-20 is now for 2024-02-22.

8.7. Badges#

  1. Choose two languges with different standings in the desired admired list. THis could be a highly admired and least desired; it could be one with a small gap and one with a large gap. Read a few posts about each language and try to figure out why it is/not admired or desired. Summarize your findings. Include links to all of the posts you read in a section titled ## Sources in your markdown file. For each source, make a bulleted list with some notes about the author’s background and any limitations that might put on the scope of their opinions. (for example, a data scientists’s opinion on languages is very valuable for data science, but less for app development) Add this to your kwl repo in language_love_dread.md.

  1. Describe a type of project where it would be worth it for you to learn a language you have never used before in newlanguage.md This should be based in what types of features for the language your project would require and/or what would contribute to the long term health of the project.

  2. Learn about one of the following languages that you have not used before: R, Julia, Clojure, Zig, Go, erlang, Elixir or another language you are curious about that appeared in the Developer survey. For example you might be interest in the top paying languages. Use the official documentation. Answer the following questions in languagelearning.md:

    1. What is this language designed for?
    2. What Programming paradigm(s) does it support?
    3. Give at least 1 example of a programming language that experience in would make it **easy** to learn this language and explain why. 
    4. Give at least 1 example of a programming language that experience in would make it **hard** to learn this language and explain why. 
    5. What is its most unique feature(s)?
    

hint: for questions 3 & 4, for example learning Python first does not make it easy to learn C++, but learning C makes it very easy to learn C++.

Explore badge option

Actually try out one of the langauges above in a new repo created from this asssignment.

work on a branch and commit after each step

  1. Setup the devcontainer to provide the compiler/interpreter for the language of your choice. See features

  2. Add top extensions related to the language to the devcontainer.

  3. Add a gitignore file for that language

  4. Write a hello world type program in the language and make sure it runs.

  5. Use the official documentation to figure out a common task in the language and write an example program that completes something typical for that language (eg a sort data analysis in R). You may use GitHub Co-pilot in the code space to help write the code.

  6. Test your understanding of the code by trying to modify it.

  7. Fill in the prompts in the README (follow the comments)

  8. Answer the questions in the README of the template repo.

8.8. Experience Report Evidence#

If in class you should have the alternate file we made. If for makeup, your report should have all of the content above.

8.9. Questions After Today’s Class#

Important

These questions are from past semesters, you can add your own via a PR to the course website for a community badge or leave it in your experience report and I will add it later

8.9.1. Is it possible to only work with one language and never even consider using other languages?#

Maybe if you work at one company forever, but not easy.

8.9.2. Are deep learning libraries that are changed from python to another language open source?#

It’s not so much that they’re changed from Python to other langauges as far as I know. For example tensorflow has a C++ API and the optimized parts of it are written in C++. It is a Python library, but more than half of the content in the repo is C++. It is open source though.

8.9.3. What typically makes languages go obsolete?#

Some stay necessary in a small sense forever (as far as we have experienced so far) because something critical is written in it. For example COBOL has been basically considered irrelevant by computer scientists the whole time, but it is still what 95% of ATM swipes rely on.

More often I would say a language might never become popular and then becoe obsolete or a version of a language can become obsolete.

More research on this is a good explore badge.

8.9.4. Is it worthwhile to learn how Docker works in order to be more employable?#

Docker is worth learning.

8.9.5. How often should I be weighing my options for the programming language I’m going to use for a project?#

If you are starting a project from scratch it is worth thinking about it.

8.9.6. What class would give you a license to MATLAB so you can get experience for professional use?#

Here is URI’s MATLAB access information. You do not need to be in a specific class.