Posts

Showing posts from January, 2025

C++ simple code base to understand iterative and recursive algorithms. What makes an iterative function faster?

Image
  IDE - Visual Studio This project provides exposure to the Fibonacci Sequence , which is a sequence of numbers where each number is the sum of the two numbers before it.  This project provides two different approaches to calculating the Fibonacci Sequence: - A simple loop ( iterative method ). - A function which calls itself ( recursive method ) in order to solve bits of  bigger problem and with smaller numbers, the recursive method works quite well. However, as the sequence continues to a bigger number, the repeated functions calls become burdensome and causes the function to lag. **************************************************************************** Here is a screenshot of what the output should look like: **************************************************************************** Here is the code base: Sources https://dev.to/khalilsaboor/fibonacci-recursion-vs-iteration--474l

Python code base: Simple S3 project - Create an S3 bucket and upload an image file.

Image
  This simple tutorial is to help learn: - Initialise a Git repository in the current working directory (# git init) and set up basic global configurations.  - Add and stage specific files or all files for commit in the local Git respository. - Push local changes to remote Github repository to sync with local changes. - Create an S3 bucket in a specified AWS region. - Upload an image file to the newly created S3 bucket. - Verify successful upload by manually checking the S3 bucket contents and/or handling any errors. - Ask for user input when setting up global configurations for AWS credentials to avoid hard-coding credentials into the project. Code Base Use Git commands to push the main.py file to the remote Github repository: # Initialise the repository - git init  # Set up global configurations: - git config --global user.name "<user_name<" - git config --global user.email "<email>" # Create a connection between a local git repository and the main rem...