Weekly Questions 1
1 - Why did we move from punch cards to programming languages? What does that tell you about the purpose of programming languages?
- Punch cards were abandoned for a number of reasons:
- Punch cards could only store a very limited amount of data (80 bytes each), so bigger programs would require multiple cards in big stacks.
- If a character was mis-punched on a card, it would need to be re-punched.
- Because the cards had to be inserted into the machine in order, if a stack of cards was dropped, it would have to be reordered, which was tedious and took a lot of time.
- The machines themselves were quite slow.
- Magnetic tape & disk drives were more compact and allowed for faster processing.
- Programming languages were often created for early computers (including punch-card computers) as:
- Machines only operated in purely binary, mechanical language, and could not understand human commands.
- It is hard for humans to read pure binary operations, and attempting to do so may lead to errors that are hard to find and wasted calculation time.
- Assembly languages, and later higher-level languages served to make programs more readable for people while allowing computers to execute them.
2 - There are hundreds of different programming languages out there. Why do you think we need so many?
- Different programming languages were invented to address the needs of multiple different specific purposes and jobs - e.g. Java was created for websites, MATLAB for mathematical programs, Python for readability, et cetera.
- Different jobs have different programming languages that work best for them, so there are multiple programming languages to satisfy multiple varying needs.
3 - What are some drawbacks of a programming language you use? How would you like it to be different? Think of specific examples.
- Python float number operations don't always work properly because of limitations in memory (this is a limitation of many programming languages in general, though), so I would say expanding the storage of a number to improve the accuracy of float operations would be an improvement.
- Numbers ending in .5 are rounded to the nearest even integer instead of consistently up, known as banker's rounding, due to international standards for code.
- Because Python is interpreted, it is quite slow, as it reads and checks each individual line before executing, which is not ideal for heavier programs.
- Python is relatively memory-intensive for a programming language, which once again makes it slower with larger programs.
4 - If you were going to create a new programming language, how would you start? What do you need to define?
- To create a new programming language, I would need to determine and define:
- The target audience (experienced programmers, newbie programmers, teachers, students, etc)
- What purpose it serves / problem it solves
- The syntax (“grammar”) of the language and the functions that come with it
- If it should be interpreted (executed as it reads the program) or compiled (translates it into a file before executing)
References & Websites