Click on image to see full size.

Web Server: Acts like the control centre, managing user requests and providing information.

CDN (Content Delivery Network): Speedy roads that deliver content to users worldwide.

DNS (Domain Name System): An address book that translates web names at IP addresses.

Client: Residents (users) who interact with the system.

Load Balancer: Acts lie a traffic manager, distributing requests for stability.

Read API: Works like a librarian, fetching data from storage to users.

Services (e.g. Timeline, Search): Specialty shops offering unique user experiences.

Write API: Allow users to add new content, like creating art.

Search API: A search engine helping users find what they need.

Object store: The city’s warehouse, securely storing files and data.

SQL Write Master Slave, Read Replicas: Efficient memory managing data updates and access.

Memory Cache: Quick access storage for frequently user data.

These components work together seamelessly, ensuring smooth operations like a well-organised structure.

Click on image to see full size. Read the comments for description.

10 Good Coding Principles to improve code quality. The HD pdf download link can be found at the end.

Software development requires good system designs and coding standards. We list 10 good coding principles in the diagram below.

1. Follow Code Specifications
When we write code, it is important to follow the industry’s well-established norms, like “PEP 8”, “Google Java Style”, adhering to a set of agreed-upon code specifications ensures that the quality of the code is consistent and readable.

2. Documentation and Comments
Good code should be clearly documented and commented to explain complex logic and decisions, and comments should explain why a certain approach was taken (“Why”) rather than what exactly is being done (“What”). Documentation and comments should be clear, concise, and continuously updated.

3. Robustness
Good code should be able to handle a variety of unexpected situations and inputs without crashing or producing unpredictable results. Most common approach is to catch and handle exceptions.

4. Follow the SOLID principle
“Single Responsibility”, “Open/Closed”, “Liskov Substitution”, “Interface Segregation”, and “Dependency Inversion” – these five principles (SOLID for short) are the cornerstones of writing code that scales and is easy to maintain.

5. Make Testing Easy
Testability of software is particularly important. Good code should be easy to test, both by trying to reduce the complexity of each component, and by supporting automated testing to ensure that it behaves as expected.

6. Abstraction
Abstraction requires us to extract the core logic and hide the complexity, thus making the code more flexible and generic. Good code should have a moderate level of abstraction, neither over-designed nor neglecting long-term expandability and maintainability.

7. Utilize Design Patterns, but don’t over-design
Design patterns can help us solve some common problems. However, every pattern has its applicable scenarios. Overusing or misusing design patterns may make your code more complex and difficult to understand.

8. Reduce Global Dependencies
We can get bogged down in dependencies and confusing state management if we use global variables and instances. Good code should rely on localized state and parameter passing. Functions should be side-effect free.

9. Continuous Refactoring
Good code is maintainable and extensible. Continuous refactoring reduces technical debt by identifying and fixing problems as early as possible.

10. Security is a Top Priority
Good code should avoid common security vulnerabilities.

10goodcodingprinciples

Git workflow.

Click on image to see full size. Read the comments for description.

1. Your workspace and Local Repository:
Imagine your workspace as your personal coding canvas, where you create and modify your code. Git allows you to stage these changes in the index before committing them to your local repository. This local repository acts like a personal backup, allowing you to track and manage your code’s history.

2. Sharing Your Code:
With Git, you can synchronise your local changes with a remote repository, transforming your code from a solo act to a collaborative symphony.

3. Reaching the Wider World:
Whether you want to share your code with specific collaborators or make it available to the entire developer community, Git empowers you to distribute your code through directories or websites.

4. Mastering Git Commands:
Unlock the full potential of Git with essential commands like:
- Diff: Compares changes between different versions of your code.
- Add -u: Stages modifications for your next commit.
- Commit -a: Commits all staged changes to your local repository.
- Pull/rebase: Updates your local repository with changes from others.
- Rebase -i: Interactively edits your commit history.
- Checkout HEAD: Resets your workspace to the latest commit.
These commands are your tools for navigating the collaborative coding landscape, allowing you to work together effectively and efficiently.

5. Push, Pull and Tag:
- Pushing your changes to the remote repository like sending a ship across the ocean, sharing your work with others.
- Pulling updates is like receiving a message in a bottle, bringing in changes from your collaborators. – Tagging significant points in your project’s history is like planting a flag, marking key milestones along the way. These actions are essential for smooth collaboration and maintaining a clear history of your project’s journey.

By understanding the core concepts of Git workflow, you can unlock the power of collaborative coding and take your projects to new heights.

Click on image to see full size. Read the comments for description.

Click on image to see full size. Read the comments for description.