Software Engineering Cheat Sheet

Software Development Life Cycle (SDLC) Models

ModelDescriptionAdvantagesDisadvantagesBest Use Case
WaterfallSequential development phasesSimple, structured, well-documentedInflexible, late testing, difficult to changeWell-defined requirements, stable technology
AgileIterative, customer-focused developmentFlexible, customer collaboration, rapid deliveryRequires customer involvement, difficult to estimateChanging requirements, customer collaboration
IterativeDevelop in iterations with feedbackEarly error detection, risk managementResource-intensive, complex managementLarge projects, evolving requirements
SpiralRisk-driven, prototype-basedRisk management, flexibleComplex, expensive, requires expertiseHigh-risk projects, large systems
V-ModelTesting phase for each development phaseSystematic, early testing planningInflexible, late discovery of issuesRegulated industries, safety-critical
DevOpsDevelopment and operations integrationContinuous delivery, automation, collaborationRequires cultural change, learning curveContinuous deployment, automation

Agile Methodologies

MethodologyKey PrinciplesKey PracticesBest For
ScrumIterative sprints, self-organizing teamsSprint planning, daily standups, retrospectivesComplex projects, cross-functional teams
KanbanVisual workflow, continuous deliveryVisual boards, WIP limits, flow optimizationContinuous flow, maintenance projects
Extreme Programming (XP)Customer satisfaction, rapid feedbackPair programming, TDD, continuous integrationChanging requirements, high-quality code
LeanEliminate waste, optimize workflowValue stream mapping, continuous improvementEfficiency, waste reduction
CrystalPeople and interaction over processesReflective improvement, personal communicationSmall teams, high-criticality projects

Software Testing Types

TypeFocusWhenTechniquesTools
Unit TestingIndividual componentsDuring developmentWhite box, equivalence partitioningJUnit, NUnit, PyTest
Integration TestingModule interactionsAfter unit testingTop-down, bottom-up, sandwichTestNG, Mockito, JMock
System TestingComplete systemAfter integrationBlack box, functional testingSelenium, JMeter, LoadRunner
Acceptance TestingBusiness requirementsBefore deliveryUser acceptance, alpha/beta testingCucumber, FitNesse, UFT
Regression TestingEnsure no new bugsAfter changesRetest, selective retestSelenium, TestComplete, Ranorex
Performance TestingSpeed, stability, scalabilityBefore productionLoad, stress, endurance testingJMeter, LoadRunner, Gatling
Security TestingVulnerabilitiesThroughout developmentPenetration testing, vulnerability scanningOWASP ZAP, Burp Suite, Nessus

Design Patterns

PatternCategoryPurposeImplementationBenefits
SingletonCreationalEnsure single instancePrivate constructor, static instanceControlled access, reduced memory
FactoryCreationalCreate objects without specifying classFactory method, abstract factoryLoose coupling, flexibility
ObserverBehavioralDefine one-to-many dependencySubject, observer interfacesLoose coupling, broadcast
StrategyBehavioralDefine family of algorithmsInterface for algorithmsRuntime algorithm selection
DecoratorStructuralAdd responsibilities dynamicallyWraps original objectFlexible alternative to subclassing
AdapterStructuralConvert interface to compatible oneWrapper patternMake incompatible interfaces work together
CommandBehavioralEncapsulate request as objectCommand interface, invokerParameterize, queue, log requests
FacadeStructuralProvide unified interfaceSimple interface to complex systemSimplify complex subsystems

Software Quality Metrics

CategoryMetricDescriptionMeasurementTarget
ProductivityLines of Code (LOC)Size of softwareCount of source linesContext-dependent
ProductivityFunction PointsFunctionality providedCount of inputs, outputs, files10-15 FP per person-month
ProductivityCode ReuseReusable componentsPercentage of reused code60-80%
QualityDefect DensityDefects per size unitDefects / KLOC or FP1-5 defects/KLOC
QualityCode CoverageCode testedPercentage of code exercised80-90%
QualityCyclomatic ComplexityCode complexityNumber of linearly independent paths3-7 per method
MaintenanceMaintainability IndexEffort to maintainBased on complexity, lines, comments65-100 (higher better)
MaintenanceMean Time to Repair (MTTR)Time to fix defectsAverage time to resolve issuesAs low as possible

Software Configuration Management

ActivityPurposeToolsBest Practices
Version ControlTrack changes to codeGit, SVN, MercurialCommit frequently, use branches, meaningful commit messages
Build ManagementAutomate build processMaven, Gradle, Ant, MakeAutomate, consistent environment, dependency management
Release ManagementManage software releasesJenkins, Bamboo, TeamCityAutomated testing, staging environments, rollback plans
Change ManagementControl changes to softwareIssue trackers, change logsImpact analysis, approval process, documentation
Configuration ManagementManage system configurationsAnsible, Puppet, ChefInfrastructure as code, version control, automation

Requirements Engineering

ActivityDescriptionTechniquesDeliverables
Requirements ElicitationGather requirements from stakeholdersInterviews, surveys, observation, prototypingRequirements document
Requirements AnalysisUnderstand and organize requirementsUse cases, user stories, context diagramsAnalysis model
Requirements SpecificationDocument requirements formallySRS document, specificationsSoftware Requirements Specification
Requirements ValidationVerify requirements are correctReviews, prototyping, model checkingValidated requirements
Requirements ManagementTrack and control requirementsTraceability matrices, toolsRequirements traceability

Software Architecture Patterns

PatternDescriptionAdvantagesDisadvantagesUse Case
Layered (n-tier)Organized into horizontal layersSeparation of concerns, maintainablePerformance overhead, rigid structureEnterprise applications
Client-ServerClient requests, server respondsSeparation of concerns, scalabilitySingle point of failure, network dependencyWeb applications
MicroservicesSmall, independent servicesScalability, technology diversityComplexity, network latencyLarge, complex applications
Event-drivenComponents react to eventsLoose coupling, scalabilityComplexity, debugging difficultyReal-time applications
Model-View-ControllerSeparate data, presentation, logicSeparation of concerns, maintainableComplexity, over-engineeringGUI applications
RepositoryMediates between domain and data mappingDecoupling, testabilityComplexity, performanceData-centric applications

Software Maintenance Types

TypePurposeExamplesPercentage of Effort
CorrectiveFix defectsBug fixes, error corrections20%
AdaptiveModify for environment changesNew OS, hardware changes, regulatory changes25%
PerfectiveImprove performance/functionalityPerformance improvements, feature enhancements50%
PreventivePrevent future problemsCode refactoring, documentation updates5%

Project Management in Software Engineering

AspectDescriptionTechniques/ToolsKey Considerations
Project PlanningDefine scope, schedule, resourcesWBS, Gantt charts, PERT, critical pathAccurate estimation, risk assessment
Project EstimationEstimate effort, time, costCOCOMO, Function points, expert judgmentHistorical data, team experience
Risk ManagementIdentify, analyze, mitigate risksRisk matrix, mitigation plansEarly identification, contingency plans
Quality ManagementEnsure software qualityQuality standards, reviews, testingQuality planning, continuous improvement
Team ManagementManage human resourcesTeam building, communication, motivationSkills, roles, communication
Change ManagementControl requirement changesChange control process, impact analysisDocumentation, approval process