-
What is a “Function” in Programming?, & What is “Object Oriented Programming” (OOP)–Notes
Functions Function–a block of code packaged together with a name. Functions are a core feature of all programming languages. aka–sub-routines, methods, or some other name. a way to break up your code. a key benefit of functions is that they help us avoid writing the same lines of code again & again. Once you create a function, you can call it by using its name followed by a set of parenthesis( ). Functions can change their behavior depending on the parameters and arguments given. To have a function return a value, use the “return” statement. Ex: ‘return my_value’ Being able to return values from functions is a cornerstone of programming.…
-
Some Quick Notes On Python Syntax…
Some Quick Notes On Python Syntax: Python was designed for readability, and has some similarities to the English language with influence from mathematics. Python uses new lines to complete a command, as opposed to other programming languages which often use semicolons or parentheses. Python relies on indentation (using whitespace), to define scope; such as the scope of loops, functions, & classes. Other programming languages often use curly-brackets for this purpose. Python uses the colon symbol (:) and indentation for showing where blocks of code begin and end. That is, blocks in Python, such as functions, loops, ‘if’ clauses and other constructs, have no ending identifiers (other than the start of…
-
A Comment on Comments In Programming Languages…
A Comment on Comments: One of the most important of programming tools is comments! Comments are just lines in the programs which describe what’s going on. Comments can tell the programmer what’s going on and more importantly why! Good comments are important if the programmer reading the code isn’t the one who wrote it, or, it’s been a long time since they wrote it. Another way of thinking about comments is that, “comments are Code!“, and rather than comments explaining code to other programmers, CODE explains the comments to the computer! Either way comments are useful and important and every language has a way of indicating comments. Python uses a…
-
Arithmetic Operators Notes
Arithmetic Operators Notes Operator Example Description M + N Addition of M and N M – N Subtraction of N from M M * N Multiplication of M and N M / N Division of M by N (The result will be a real number.) M // N Integer division of M by N (The result will be an integer.) M % N Modulo: find the remainder of M divided by N M ** N Exponentiation: M to the power of N (e.g., 2 ** 4 results in 16. 2*2*2*2=16 Arithmetic Operators Note: Python also has the math module that contains common math functions (such as sin, cos, etc.) Shortcut…
-
Raw Materials–Data, Variables, & Data Types–Notes…
Raw Materials Data, Variables, & Data Types The ‘materials‘ we use in programming are the data that we can manipulate. Data is the “stuff“, the raw information, that our program manipulates. Programs manipulate data in many ways, often depending on the type of data. Data comes in the form of many types, and each data type has a number of operations–things that we can do to it. So, the things that we can do, or perform on the data, depends on what type of data we have at our disposal. Variables refer to data and (depending on the programming language) may need to be declared before being defined, or used.…
-
What is a program?–Notes…
What is a program? A program is a sequence of instructions that specifies how to perform a computation. A few basic instructions appear in just about every language: input–get data from a keyboard, a file, or some other device. output–display data on the screen or send data to a file or other device. maths–perform basic mathematical operations like addition & multiplication. conditional execution–check for certain conditions and execute the appropriate sequence of statements. repetition–perform some action repeatedly, usually with some variation. That’s pretty much all there is to it! Every program is made up of instructions that look more or less like these! We can describe programming as the process…
-
Phonetic Alphabet
A–> Alpha B–> Bravo C–> Charlie D–> Delta E–> Echo F–> Foxtrot G–> Golf H–> Hotel I–> India J–> Juliett K–> Kilo L–> Lima M–> Mike N–> November O–> Oscar P–> Papa Q–> Quebec R–> Romeo S–> Sierra T–> Tango U–> Uniform V–> Victor W–> Whiskey Y–> Yankee Z–> Zulu
-
Notes to Self 11/05/2020
Notes to Self 11/05/2020 “Hack everything but harm none.” OSSTMM (www.osstmm.org); Pronounced “aw-stem”. Open Source Security Testing Methodology Manual Interactions–Trust interactions are between people & things that are familiar with each other. Access interactions happen between unknown people or systems. (You can use an ‘access‘ to take what you want yourself, or you can trick someone who has a ‘trust’ with the target to take what you want for you and give it to you.) Visibility interaction– ‘opportunity’; knowing if there’s something to interact with or not. “Privacy is the opposite of ‘Visibility’ and it’s a powerful way to avoid being a target. Whether its on dangerous streets, in the…
-
What is GIT? GIT–Version Control System
What is GIT? Git is a popular Version Control System. The aim of Git is to manage software development projects, and its files, as they are changing over time. Git stores this information in a data structure called a repository! A git repository is a central place where developers store, share, test and collaborate on web projects. A repository is kind of like an enhanced Unix directory, or folder, but with the additional ability to track changes to every file and subdirectory. The way to create a new repository with Git is with the “init” command (short for “initialize”_, which creates a special hidden directory called “.git”, where Git stores…
-
Moving Around (pushd & popd): Notes: List of Terminal Commands
Moving Around (pushd & popd) pushd (push directory) & popd (pop directory) let you temporarily go to a different-directory, and then come back, easily switching between the two!! pushd–lets you save your current location and go to a new location. The “pushd” command takes your current directory and “pushes” it into a list for later, then it ‘changes’ to another directory. It’s like saying, “Save where I am, then go here.” popd–lets you return to the saved location. The “popd” command takes the last directory you pushed and “pops” it off, taking you back there. Note: On Unix-machines “pushd“, if you run it by itself with no arguments, will switch…