* Software Engineering :PROPERTIES: :ANKI_DECK: soft-eng :END: ** Where does the name for Emacs come from? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1765171044569 :ANKI_NOTE_HASH: deae2daddfaf19f40d74525b1bfc3a79 :END: "​*e*​ditor *mac*​ro​*s*​". circ 1976 @ MIT on a time sharing system. ** What does DOM stand for? :javascript: :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1765244330610 :ANKI_NOTE_HASH: 97f38ceba8bc1cd23d3eeab530632589 :END: Document Object Model ** What is React? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1765244330613 :ANKI_NOTE_HASH: 0ad06cd766435d0eb4b7a249bbe1e0d4 :END: open-source Javascript library for building User Interfaces (front-end framework) ** How does React work? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1765544887495 :ANKI_NOTE_HASH: 0eee6c10de742be02aa803f96e19c797 :END: it reloads the components when the underlying data changes. hence it is predictable and easier to debug than manipulating the DOM directly. ** How does React use a Virtual DOM? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1765244330615 :ANKI_NOTE_HASH: f232821a6a84041cf6628924356ee42b :END: it keeps an in-memory representation of the DOM to *efficiently* update the real DOM. enhances performance through /reconciliation/. ** What is Svelte? How does it differ to React? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1765244330618 :ANKI_NOTE_HASH: 7d3c9eda39aabcd5f13952cb7fd6d29d :END: It is a Javascript compiler whereas React is a UI framework. ** Is React Typescript only? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1765244330621 :ANKI_NOTE_HASH: 0d35c3654f151b12b6233d58ccf7edcc :END: No it is JXL (Javascript XML) compatible with Typescript optional. ** What do all three of these do in javascript? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_PREPEND_HEADING: t :ANKI_NOTE_ID: 1765244330623 :ANKI_NOTE_HASH: 04809af34108d825d28dcfe6b91e0e23 :END: #+begin_src javascript document.getElementById('myId') document.querySelector('.myClass') document.querySelectorAll('div p') #+end_src *** Back Selecting elements ** What do the following commands do in JavaScript? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_PREPEND_HEADING: t :ANKI_NOTE_ID: 1765244330624 :ANKI_NOTE_HASH: 45a5dbe429be0b7340617b3255f69293 :END: #+begin_src javascript element.innerHTML = 'New HTML' element.textContent = 'New text' #+end_src *** Back Modifying content ** What do these do in JS? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_PREPEND_HEADING: t :ANKI_NOTE_ID: 1765244330625 :ANKI_NOTE_HASH: e5f7ba7d62c36c93f31cb6b8208bbbe9 :END: #+begin_src javascript element.style.color = 'blue' element.setAttribute('src', 'new-image.jpg') #+end_src *** Back Change style / attributes. ** What do these do in javascript? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_PREPEND_HEADING: t :ANKI_NOTE_ID: 1765244330626 :ANKI_NOTE_HASH: bf2c18a78ee22423091f189ca062b873 :END: #+begin_src python document.createElement('div') parentElement.appendChild(newElement) parentElement.removeChild(childElement) #+end_src *** Back Create / remove elements ** React and Svelte are considered {{c1::frameworks}} or specialised tools rather than just libraries. :PROPERTIES: :ANKI_NOTE_TYPE: Cloze :ANKI_NOTE_ID: 1765244330627 :ANKI_NOTE_HASH: 283d077d666cded2dba2b9e431d49880 :END: ** {{c1::Next.js}} is built on-top of {{c2::Node.js}} :PROPERTIES: :ANKI_NOTE_TYPE: Cloze :ANKI_NOTE_ID: 1765244330628 :ANKI_NOTE_HASH: c42770518873817f5550b5c2973c1430 :END: ** Node.js is a {{c1::run-time environment}} that allows {{c2::Javascript}} to be executed {{c3::outside of a web-browser}} :PROPERTIES: :ANKI_NOTE_TYPE: Cloze :ANKI_NOTE_ID: 1765244330629 :ANKI_NOTE_HASH: eb74c5c570840631c3f80ba4937012f5 :END: ** Next.js is a {{c1::full-stack framework}} for {{c2::React applications}}. It uses {{c3::Node js}} as its {{c4::server engine}} to enable features like {{c5::Server-Side Rendering}} and {{c6::API Routes}} :PROPERTIES: :ANKI_NOTE_TYPE: Cloze :ANKI_NOTE_ID: 1765244330630 :ANKI_NOTE_HASH: 9815b2ff1ad9b04f88d59b6d953cb043 :END: ** What kind of programming language is Lisp? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1766576068784 :ANKI_NOTE_HASH: 155aa9a3216e2aff054123ca8a4c2bf5 :END: Lisp is a family of functional programming languages that are typically dynamically typed and often interpreted, with strong support for symbolic computation and metaprogramming. ** What kind of programming language is Haskell? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1766576068786 :ANKI_NOTE_HASH: 0f127bbad2d0979da5ea44e2d2cb33a4 :END: Haskell is a purely functional, statically typed language that is typically compiled. It emphasises immutability and lazy evaluation. ** What kind of programming language is Python? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1766576068788 :ANKI_NOTE_HASH: 396e4e03b57de4430c6c935bdf37336b :END: Python is a dynamically typed, object-oriented language that is typically interpreted. It also supports multiple paradigms, including procedural and functional styles. ** What kind of programming language is Java? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1766576068790 :ANKI_NOTE_HASH: 360cdafbfc529609b243e078c9e3f4b0 :END: Java is an object-oriented, statically typed language that is compiled to platform-independent bytecode and executed on the Java Virtual Machine (JVM). ** What kind of programming language is C? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1766576068792 :ANKI_NOTE_HASH: 39d61b65b4ffdbc852813caf7ccfc7d1 :END: C is a procedural, statically typed language that is typically compiled to native machine code. ** What kind of programming language is Go? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1767059202797 :ANKI_NOTE_HASH: 7c32dc6e659ce020b8b1f31b7796f199 :END: Go is a statically typed, compiled language with a procedural and concurrent programming model. It emphasises simplicity, fast compilation, and built-in support for concurrency via goroutines and channels. ** What kind of programming language is R? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1767059202807 :ANKI_NOTE_HASH: 2dfec33f348dda315c846ed4dbbcad65 :END: R is a dynamically typed language primarily designed for statistical computing and data analysis. It supports functional and vectorised programming styles and is typically interpreted. ** What kind of programming language is C++? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1767059202810 :ANKI_NOTE_HASH: 92c0d60f073f644e80036b1829e8b579 :END: C++ is a statically typed, compiled language that supports multiple paradigms, including procedural, object-oriented, and generic programming. It provides low-level memory control and high performance. ** What kind of programming language is JavaScript? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1767059202812 :ANKI_NOTE_HASH: 1f74b4736d51f1c7fb0c4a75acebfcb9 :END: JavaScript is a dynamically typed, interpreted language that is primarily used for web development. It supports event-driven, functional, and object-oriented programming paradigms. ** What kind of programming language is C#? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1767059202815 :ANKI_NOTE_HASH: f0982ea3fb5606bd1cba66348af49369 :END: C# is a statically typed, object-oriented language that is typically compiled to intermediate language and executed on the .NET runtime. It supports multiple paradigms, including functional features. ** What kind of programming language is SQL? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1767059202817 :ANKI_NOTE_HASH: 0b73e8309aba48303e98131441ab88f5 :END: SQL is a declarative, domain-specific language used for querying and managing relational databases. It focuses on describing *what* data is desired rather than *how* to compute it. ** What kind of programming language is TypeScript? :PROPERTIES: :ANKI_NOTE_TYPE: Basic :ANKI_NOTE_ID: 1767059202820 :ANKI_NOTE_HASH: 9220e2ab87d0059a8dfd9ce2b604cd53 :END: TypeScript is a statically typed superset of JavaScript that is typically transpiled to JavaScript. It adds optional static typing and compile-time checks while preserving JavaScript’s runtime model.