Code-Memo

Quick random notes


SDLC

The Software Development Life Cycle, or SDLC, is a structured process used to design, develop, test, and deploy software systems. SDLC includes a series of steps and phases:

SDLC Methodologies:


Issue Types in Jira:


Software Development Approaches
  1. Domain-Driven Design (DDD): Understanding the problem and modeling the software around the real world (domain).

  2. Test-Driven Development (TDD): Writing tests first to guide your coding. Keep refactoring code while keeping tests green.

  3. Behavior-Driven Development (BDD): Describing how software should behave in plain language to connect business and development.


CI/CD


Authentication and Authorization

Authentication is the process of verifying the identity of a user or system. Authentication Methods:


Authorization determines what actions an authenticated user is allowed to perform. Authorization Methods:

  1. Role-Based Access Control (RBAC).
  2. Attribute-Based Access Control (ABAC) (e.g, Policies and Attributes)
  3. Access Control Lists (ACLs)


Architecture Styles


Naming Conventions
  1. Variables and Properties: snake_case or camelCase.
  2. Constants: UPPER_SNAKE_CASE.
  3. Functions and Methods: camelCase.
  4. Classes, Namespaces, and Modules: PascalCase.
  5. Files and Folders: kebab-case or snake_case.


HTTP Methods


Server Codes

100 Continue: Server received initial request part; client should continue sending.

101 Switching Protocols: Server is changing protocol as requested (to WebSocket for example).

102 Processing: Server is working on the request but no response yet (used to avoid timeouts).

200 OK: Request succeeded and the response contains the requested data.

201 Created: Request succeeded and a new resource was created.

204 No Content: Request succeeded but no content is returned in the response.

218 This is fine: Request was successful, but things may not actually be fine :P

301 Moved Permanently: Resource permanently moved; future requests should use new URL.

307 Temporary Redirect: Request should temporarily redirect; future requests still use original URL.

400 Bad Request: Invalid request syntax or malformed data.

401 Unauthorized: Authentication required to access resource.

403 Forbidden: Server refuses to authorize the request despite understanding it.

404 Not Found: Resource not found at the requested URL.

405 Method Not Allowed: HTTP method used is not supported by the resource.

429 Too Many Requests: Client has sent too many requests in a given timeframe (rate limiting).

500 Internal Server Error: Server encountered an unexpected error.

501 Not Implemented: Server does not support the requested functionality.

502 Bad Gateway: Server acting as proxy received invalid response from upstream.

503 Service Unavailable: Server is overloaded or down for maintenance.


HTTP vs HTTPS

HTTP is the HyperText Transfer Protocol used for unsecured communication over the web, while HTTPS is HTTP Secure which adds encryption via TLS/SSL to ensure data confidentiality, integrity, and authentication between client and server.

SLA Levels

SLA % Max Downtime/Year Typical Use Case Considered Good?
99.9% ~8.76 hours/year Mid-tier apps, internal tools Decent
99.95% ~4.38 hours/year SaaS apps, e-commerce Good
99.99% ~52.6 minutes/year High-availability systems (APIs, DBs) Very Good
99.999% ~5.26 minutes/year Mission-critical (finance, healthcare) Excellent
100% 0 minutes/year Unrealistic in practice (no one offers this) ❌ Not realistic

What’s Generally Considered Good?

Throttling vs Rate limiting

Throttling: Gradually slows down user requests to control traffic flow. Rate limiting: Strictly caps the number of user requests allowed in a time window.