Design patterns are typical solutions to commonly occurring problems in software design. They are like pre-made blueprints that can be customized to solve a recurring design problem in any code.
All patterns can be categorized by their intent, or purpose.
Creational Patterns This pattern provides ways to create object creation in a manner that increases flexibility and reuse of code.
Factory Method This pattern provides an interface for creating objects in a superclass, but allows subclasses to alter the type of objects that will be created.
SOLID is a set design principles in object-oriented context to make maintainable, testable and extendable software.
Single Responsibility A class should only have one responsibility. Furthermore, it should only have one reason to change.
Benefits:
Testing: A class with one responsibility will have far fewer test cases. Lower coupling: Less functionality in a single class will have fewer dependencies. Organization: Smaller, well-organized classes are easier to search than monolithic ones. Example Bad A class representing a book:
DynamoDB is a fully managed NoSQL database service.
Components Tables A table is a collection of data, similar to other database systems. For example a table called Employee can store name, designation, salary, manager, etc. Each item in the table has a unique identifier, or primary key. Besides the primary key, the table is schemaless and does not need to be defined while creating a table. Each item in a table can have its own distinct attributes.
Info This post assumes prior knowledge of python and selenium 4 Installation Selenium: pip install selenium
Download the drivers, make sure that your browser, selenium and driver versions are compatible with each other.
Chrome: https://chromedriver.chromium.org/downloads Firefox: https://github.com/mozilla/geckodriver/releases Edge: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ Instantiate your driver Chrome from selenium import webdriver driver = webdriver.Chrome(executable_path="C:/webdrivers/chromedriver.exe") With custom options from selenium import webdriver from selenium.webdriver.chrome.options import Options options = Options() ## option to not show an open browser window options.
Setup User name: git config --global user.name "[firstname lastname]" Email: git config --global user.email "[valid-email]" Color: git config --global color.ui auto Initialization and cloning Make your current folder a git repo: git init Clone a repo: git clone [url] Staging and commits Get status of staged, unstages and untracked files: git status Add files to staging: git add [file] Remove a file from staging: git reset [file] Remove a file from staging and remove all changes: git reset --hard [file] Differences in files that are modified but not staged: git diff Differences in files that are staged but not committed: git diff --staged Commit changes: git commit -m "[message]" Commit only specific portion of a file: git add -p [file] Note: Git will go into interactive mode and prompt options for actions on each hunk.