Nine Math Fundamentals of Programming

by stink - on Oct 30, 2023 3:19pm to programming comments(0)
#1 Arithmetic: This is numbers and the operators +, -, *, / and %. Numbers are integers or decimal values. There are different types of numbers and the difference is the range of values they support.

#2 Boolean Algebra: This is true and false and the operators AND, OR, and NOT. There are other concepts to be aware of like short circuiting and De Morgan's laws.

#3 Strings: This is string values and their operators and functions. You can concatenate strings. You can get a single character at a certain position (indexing). Some of the string functions are substring, slice, splice, toLower and length - there are many others.

#4 Composite Data Types: This is a variable that holds multiple values and its operators and functions. For example, arrays, sets, vectors and lists. This is similar to #3 strings and sometimes they are the same thing.

#5 Bitwise Operators: These operators work on the binary representation of values. The common bitwise operators are AND, OR, XOR, NOT, left shift and right shift. I personally rarely use these.

#6 Relational Operators: These operators are <, <=, ==, !=, > and >=. These are typically used with numbers but some programming languages support them for strings and composite data types.

#7 Order of Operations: This is the order in which operators are executed. There is default order of operations, and you can customize order of operations using parenthesis.

#8 Infinite Nesting: Be aware that you can infinitely nest more or less all of above to build very large expressions.

#9 Functions: This is a concept that was invented by Isaac Newton 350 years ago and is the cornerstone of all software development. Functions have many subtopics including modularization, encapsulation, recursion, arguments, parameters, return values, closures, scope, anonymous functions, functional programming, higher order functions, currying, side effects, pure functions and others.
Some comments may be hidden. Show all.
no comments yet