2026-08-06 14:07

Status:


IBM - ISE - Module 3 - Basics of Programming

==Programming Languages and Organization

  • Interpreted and Compiled Programming Languages:
    • Programming Languages- help tell computers what to do

    • Computers use binary in order to perform instructions, so programming languages act as a medium between the binary and human readable instruction

    • They make it easier to communicate with the computer

    • Two common programming languages are interpreted & compiled

    • There are many languages in both categories with different ones being hybrids of each as well

    • For example MY LANGUAGE I WROTE, is technically an interpreted language that does not produce any form of binaries like java might, but it has both a Abstract Syntax Tree Compiler, Bytecode compiler, and then it’s very own interpreter for the byte-code, see Syntax for Oli-Nat programming language for more detail

    • Pasted image 20260806142402.png

    • Interpreted Languages are also commonly called scripting languages

    • They run through the interpreter on your computer’s operating system or browser

    • They translate the human readable code into binary code and allow the computer to complete the task

    • Some interpreted programming languages are now outdated and not used as often because they have been around for like 80 years now

    • Interpreted programming languages need an interpreter to translate the source code

    • Examples include JavaScript, Python, and HTML though the former two are really hybrids nowadays

    • Pasted image 20260806143127.png

    • Compiled Programming Lanuages run directly on your operating system, and using a given tool, are compiled directly into binary code for your CPU architecture

    • This makes them run much faster, and probably take longer to actually compile, but are much easier to run and smoother once they get going

    • This also means however that it only runs for that given architecture only, and you need some other compiler for another CPU architecture

    • They basically pile the code into one executable file

    • Some compiled programming language examples: C, C++, C# and basically those haha

  • Query and Assembly Programming Languages:
    • Programming Lanuage Levels:

      • High-Level - more sophisticated and uses common english, it might also have things like classes and a lot of built in functions. Might also include things like a garbage collector and no lower level memory management.
      • Examples include Python, Pascal, SQL
      • Low-Level - have direct access to memory and it’s manipulation, but it might be harder to read and debug, but run a lot faster once they get working
      • Examples include Assembly, C, Fortran
    • A Query is a request for information from a database

    • The database would handle the query, and searches it’s tables for information requested and returns results

    • When querying a database, it is important that both the user application making the query and the database handling it are speaking the same language

    • Writing a query is using predefined and understandable instructions to make the request to a database

    • Generally this is referred to as a Query Language but it might be called a Database Query Language

    • The most popular and common one is called SQL

    • Also NoSQL which stands for Not Only SQL, with the primary difference is the data structures they have

    • SQL is relational and use structured, pre-defined schemas

    • NoSQL are non-relational and have dynamic schema for unstructured data

    • They are primarily used to CREATE, READ, UPDATE, and DELETE (CRUD) data in a database

    • You would perform one of these operations by sending in a query that would relate to one of these operations above

    • The database generally consists of structured tables with multiple rows and columns of data

    • Generally the queries are either select commands or action commands like CREATE, INSERT, UPDATE

    • More commonly though, these are called statements and not commands

    • Select queries request data, while action queries manipulate the data in a database

    • Below are some of the most common SQL Query Statements

    • Pasted image 20260806144235.png

    • With some common Syntax Examples as well:

    SELECT * FROM suppliers;
    SELECT name FROM suppliers WHERE name = 'mike';
    CREATE DATABASE products;
    DROP TABLE suppliers;
    ALTER TABLE suppliers;
    DROP COLUMN firstname
    SELECT AVG(purchases) FROM suppliers
    
    • Pasted image 20260806145114.png

    • Assembly Languages are less sophisticated than query languages, they are also the things that make up structured programming languages and OOP programming languages

    • They use very simple symbols to represent 0s and 1s

    • They are CLOSELY tied to each CPU architecture, and so each chip usually has it’s own assembly language, think like x86 Assembly vs. ARM assembly kind of an ordeal

    • They are translated via an assembler instead of a compiler or interpreter

    • One statement translates into just one single machine code instruction, like a basic add or move category, which is unlike high-level languages where one statement can be a bunch of stuff

    • Assemblers translate assembly code into machine code using mnemonics, such as

    • Input (INP), Output (OUT), Load (LDA), Store (STA), Add (ADD), the statements would consist of these opcodes which tell the CPU what to do with the data, and then the operands which is basically where the CPU can find the data

  • Understanding Code Organization Methods:
    • Code organization is good for Readability, Maintainability, and Configuring of code and code-bases

    • Well planned out software design leads to cleaner code that is less prone to things like crashes or bugs

    • Basically, make sure your shit is able to be read and you can work on it without wanting to blow your brains out, don’t just dump it all into a single file

    • There are TWO main methods in organizing code Flowcharts & Pseudocode

    • With the main difference being that pseudo-code is an informal, high-level algorithm description, which basically is just saying what the code does and how it does it with words

    • A flowchart is a pictoral representation of an algorithim displaying the different steps as boxes and arrows

    • Pasted image 20260806150656.png

    • Pseudo-Code provides a bridge to the project code because it follows the logic that the code will

    • It will also help programmers share ideas without extraneous waste of creating code

    • It also provides a structure that is not directly dependent on a single programming language

    • The above hand is an example of Pseudocode and then it getting translated to C++ right afterwards

    • Pasted image 20260806150236.png

    • Pasted image 20260806150320.png

    • Flow Charts on the other hand are good for smaller concepts and problems, unlike pseduo code which is better for larger scale issues

    • They provide an easy method of communication about the logic behind the concept of the code

    • They generally offer a good starting point for a given project, since they are easier to create than pseudo code, at least in the beginning stages

    • There is also flow-chart software which provides the ability to create flowcharts very easily

    • It allows gives drag functionality, so the flowchart can be more dynamic and help to more easily visualize what is happening

    • It also provides team collaboration for creating flowcharts

    • Some popular software include Microsfoft Visio, LucidChart, Draw.io, & DrawAnywhere

    • Pseudo code is basically just talking about what the code is going to do as a means of setting up a sort of outline, or rough draft of what the code might eventually be

    • It serves as a sort of guide to help everyone get on topic and know what it is that they are all going to be working on

    • It summarizes a programs flow, but excludes underlying details

==Programming Logic and Concepts

  • Branching and Looping Programming Logic:
    • There are TWO major types of programming logic BRANCHING & LOOPING

    • Pasted image 20260806151702.png

    • Both use boolean expressions as a means to commit what they have to do

    • They each might have things like variables and functions or subroutines to perform their actions inside

    • Boolean logic is the computer taking in the logic to make a decision, using the boolean output if it is true to make the action, or skip it if it is false

    • A variable as a value that can change whenever it is running inside of the code

    • Branching is basically the if/else statements where the program makes a decision on what portion of the code is executed and then what point of it is actually skipped based on different values of the boolean expression

    • There is no limit to the number of branches as they can generally nest

    • They can be generated by the user or generated by the code as well

    • Branching statements allow program execution to flow and jump somewhere else in a program

    • There is generally things like Switch, GoTo, or if/else statements which do this

    • Looping is basically using the code as a way to rerun the code multiple times

    • It would go back to the starting point of the code and run continuously until the loop is met, running only while the loop is actually true

    • There are things like while-loops which basically have a single condition that they themselves do not inherintly update, which repeated the inner code so long as that condition is true

    • Then, there is things like for-loops which repeat the code on a given interval or a given number of times. They can do this because they themselves create a new variable that they increment at the end of each loop, also then checking if that variable is still true, sort of like counting the number of times the action repeats

    • Common forms of looping statements are for-loops, while loops, & do-while loops

  • Introduction to Programming Concepts Part 1:
    • Identifiers- software developers use identifiers to reference program components

    • This can be things like stored values, methods, interfaces, classes, or other such things

    • In general if the identifier stores two types of data value, than that identifier can either be a variable or a constant

    • A Constant is a data item whose value does not change during the program’s lifetime, they might be something like the value of or a given player’s name or something

    • A Variable is a data item whose value might change type or value based on the programming language, this might be something like the current position of the player or something like that

    • A variable might be defined without a value in some languages, but a const value MUST always have some form of assignment on it’s creation

    • A container is a special type of identifier to reference multiple program elements

      • No need to create a variable for every element
      • They are faster and more efficient
    • For example, if you need to store 1000 integers, you would use a single variable with an array or a list and then not have to create a million different variables

  • Introduction to Programming Concepts Part 2:
    • What are functions?

    • Basically a consequence of modular programming software development methodology

    • They encourage the separation of code to make it more usable and what not

    • They are great, you know what a function is Nate

    • There is sometimes things like built in functions, like print, or I/O functions in general

    • You can generally write your own functions too though

    • Classes exist too

    • They are used for abstracting out code that lets you have single objects that have things like variables and methods

    • They are generally good because they allow for the application of more human like logic for making code, you can have things like player classes and what not for example

==Summary and Highlights

  • Interpreted programming languages create source code that runs through an interpreter and is built into your operating system (OS) on your computer or on your web browser. 
  • Compiled programming languages create executable files that are grouped in programs on your computer or device.  
  • Query languages, structured programming languages, and object-oriented programming languages are categorized as high-level programming languages and assembly languages are categorized as low-level programming languages.  
  • The two main methods of organizing and planning code are by developing flowcharts and by writing pseudocode. Flowcharts are pictorial representations of algorithms and pseudocode is an explanation of the function of each line of a program. 
  • To reference a program component, software developers use an identifier, which can either be a constant or a variable.  
  • A function is a piece of structured, stand-alone, and reusable code that will perform a single specific action.  
  • Object-oriented programming is a programming paradigm based on the concept of objects, which contain data and behavior through attributes and methods.

References