diff --git a/computer-science/languages/answers/JAMES.md b/computer-science/languages/answers/JAMES.md new file mode 100644 index 0000000..748576d --- /dev/null +++ b/computer-science/languages/answers/JAMES.md @@ -0,0 +1,31 @@ +# LANGUAGES + +## QUESTIONS + +- What is a programming language? + - a programming language is an abstraction between the haman and machine code. different languages sit at different levels above machine code. We have the raw gates on the computer, the switches that represent bits. These can be manipulated with machine code, ontop of this we might have a language like C that is very powerful and fast that converts it's code to machine code, but is more human readable. Then ontop of C we have Python that compiles into C code, but is much more human readable. These languages help us with programming computers. Some languages are JavaScript or Python or GO. + - I was mistaken on some of the above. Python isn't compiled into C, it's compiled into bytecode and executed by the Python interpreter. I could be clearer by defining the difference between higher level that abstract complex operations for better human readability with the tradeoff of being slightly slower and lower level languages that are faster, but less human friendly. +- What is a software framework? + - a software framework is an abstraction layer above a language or technology that enables a programmer to utilize one or more programming languages more effectively by structuring them in a way that they work better together. a framework like React is an abstraction on top of JavaScript that makes the manipulation of the DOM tree much easier and more powerful while also being more human readable. A Framework on top of React is something like RedwoodJS that pulls together a number of different frameworks and languages and technologies to provide an easy way for humans to build full-stack web applications. + - A clarification is that frameworks produce a more structure codebase while also needed fewer characters to get the same output as the complexity is abstracted away and enforce stronger design patterns and architecture for projects that scale and provide better maintainability. +- What is the difference between a programming language vs a framework? + - a language is a direct way to program a computer while a framework is a library on top of a language to make it more human readable and more powerful. + - frameworks have the added benefit of providing programmers with pre-designed code blocks so we don't have to write things from scratch. +- What is the difference between a procedural, object-oriented, and functional programming language? + - I don't know, I did more research on this and came up with the following. Functional programming is based around the patter on functions, while object-oriented programming is based on objects and classes and procedural programming is based on routines and procedures. +- What is the difference between a typed and non-typed language? + - I believe the difference is that a typed language requires programmers to define the types of data parameters being passed into a functions to help reduce bugs for example TypeScript and a non-typed language is JavaScript where any data type can be passed into a function as a parameter but it is not checked. + - to improve on this after some more research i'm going to improve on my terminology, "statically typed" Java and Typescript require type definitions at compile time that can help with debugging, error detection before runtime vs "dynamically typed" like Python and JavaScript determine types at runtime increasing flexibility with the tradeoff of safety. + - Corrected Explanation: In reality, all programming languages support types; however, the key distinction lies in how and when types are checked. Statically typed languages like TypeScript perform type checking at compile time, ensuring type correctness before the program runs. Conversely, dynamically typed languages like JavaScript perform type checking at runtime, which allows for more flexibility but increases the risk of runtime type errors. + +## ADVANCED + +- What is the difference between a compiled and interpreted language? Is JS compiled or interpreted? + - I believe that a compiled language is converted into a lower level language before it is run while a interpreted language is run without compilation. + - update: traditional interpreted languages are executed line by line prior to conversion to machine code. JavaScript uses Just In Time compilation to improve performance. + - Updated Explanation: Compiled languages convert code directly into machine language, which the computer's processor then executes. Interpreted languages, on the other hand, are executed by a runtime program without prior conversion to machine code. JavaScript is traditionally considered interpreted because it is commonly executed directly by a web browser. However, modern JavaScript engines use Just-In-Time (JIT) compilation to dynamically compile JavaScript into machine code, thereby enhancing performance. + +## RESOURCES +- ChatGPT... +- Claude... +- try to answer as best I can, then paste in and ask for a 0-100 score, then update based on feedback.