Evolution of Programming Languages
Programming Paradigms
Structured Programming:
- Structured programming is all about breaking down a program into smaller, manageable functions or procedures.
- It follows a linear or top-down approach, ensuring a clear sequence of execution.
- This paradigm is renowned for its simplicity and is well-suited for smaller, less complex applications.
Object-Oriented Programming (OOP):
- OOP is centered on the concept of “objects,” which represent instances of classes or templates encapsulating data and behavior.
- It encourages organizing code around objects and their interactions, simplifying the modeling of real-world entities.
- OOP languages like Java, C++, and Python facilitate the creation of reusable and modular code through classes and objects.
- It excels in handling complex applications, allowing the modeling of real-world entities and their relationships effectively.
Common Programming Constructs
docker-compose run my-environment python sequence.py
either from the command line, or your VS Code terminal.# In Python, text preceded by a # becomes a comment. Comments are used for documentation and are ignored during code execution. a = 1 # Comments can also appear after a line of code. Here, "a" is a variable with a value of 1. b = 2 print("a = " + str(a)) # Text can be built up in Python using the + symbol; this is known as concatenation. print("b = " + str(b)) c = a + b print("a + b = " + str(c)) # It's important to note that text is considered a string, while numbers are of various types (e.g., integers). # Mixing data types can yield unexpected results. For instance, 1 + 2 = 3, but "1" + "2" = "12." # To concatenate different data types using the + sign in Python, we typically use the str() function to convert integers to strings
docker-compose run my-environment python repetition.py
either from the command line, or your VS Code terminal.# Demonstrating the application of a while loop to count from 0 to 19 # It is important to emphasize that in programming languages, delineating the boundaries of code blocks is imperative. # In Python, we signify the commencement of a block by concluding the preceding line with a colon (:) and then aligning all the code within the block with a four-space indentation. count = 0 while count < 20: print(count) count += 1 # Incrementing the count by 1 during each iteration. This is equivalent to count = count + 1.
docker-compose run my-environment python selection.py
either from the command line, or your VS Code terminal.# Demonstrating the application of an "if" statement to determine if a number is even or odd # In programming, "if" statements are employed to evaluate conditions and execute specific code blocks based on the outcome. # In most languages, the % operator, known as modulus, returns the remainder of a division operation. number = 7 # You can modify this number to observe different results if number % 2 == 0: # Note the use of ==; it's used for value comparison, while a single = is for assignment. print(f"{number} is even.") # In Python, f-strings provide an elegant way for string concatenation and handle datatype conversion automatically when possible. else: print(f"{number} is odd.")
Congratulations
Nova Scotia-based software developer with a rich history in entrepreneurship and technology. In the year 2000, embarked on a collaborative journey to automate statistical data gathering for a hockey pool, which later evolved into a thriving business focused on curating sports statistics.
Through strategic contracting in various sectors, including telecommunications and insurance, contributed to the growth of the startup, eventually expanding it to a significant enterprise with over 100 employees and worldwide affiliates.
Now, in the phase of semi-retirement, founded 'Daptl' to explore new contracting opportunities, adding another chapter to an already impressive career.