Engineering Fundamentals References

Purpose

Quick-reference material for engineering fundamentals.

These references are intended for lookup rather than learning. For in-depth explanations, see the referenced guides and handbooks.

Design Principles Quick Reference

PrincipleCore Idea
Separation of ConcernsEach module has one clearly defined
responsibility.
EncapsulationHide implementation behind a stable interface.
Composition overBuild behaviour by combining small, focused
Inheritancecomponents.
Dependency InversionDepend on abstractions, not concretions.
Explicit DependenciesDeclare dependencies openly; avoid implicit
global state.
ConsistencyFollow established conventions; maintain uniform
style.
Defend againstPrefer simple designs; decompose large systems;
Complexityrefactor regularly.
Prefer Clarity overOptimize for the reader; avoid clever but
Clevernessobscure solutions.

Code Organization Patterns

PatternStructureUse When
Package by FeatureGroup code by businessMost applications; clear domain
feature.boundaries.
Package by LayerGroup by technical roleSmall applications; stable layers.
(controllers, models).
Package by ComponentGroup by deployable unit.Large systems with strong
subsystem boundaries.

Testing Quick Reference

ConceptGuideline
Test pyramidMany unit, some integration, few end-to-end.
What to testPublic interfaces, boundary conditions, error paths.
What not to testFramework code, generated code, infrastructure.
Test doublesStubs for values, fakes for slow deps, mocks
sparingly.
StructureArrange, Act, Assert.

Log Levels

LevelMeaning
ERRORFailure requiring human investigation.
WARNUnexpected condition handled gracefully.
INFOSignificant lifecycle events.
DEBUGDetailed diagnostic information (disabled in
production under normal operation).
TRACEVery detailed tracing for specific requests.

Error Handling

ConceptGuideline
Recoverable errorsHandle gracefully; continue operation.
Unrecoverable errorsFail fast with full context.
Error propagationHandle at the level with enough context to decide.
Error messagesInclude what, what was attempted, identifiers.
LoggingStructured format; never log sensitive data.

Technical Debt Classification

CategoryCharacteristicsApproach
StrategicIntentional, with plan to repay.Track, schedule, communicate.
AccidentalAccumulated through neglect.Assess, prioritize, reduce
incrementally.

Recommended Reading

TitleAuthorFocus
Clean ArchitectureRobert C. MartinArchitectural principles
The Pragmatic ProgrammerHunt & ThomasEngineering practice
Code CompleteSteve McConnellCode quality and design
Working Effectively with Legacy CodeMichael FeathersRefactoring and testing
A Philosophy of Software DesignJohn OusterhoutComplexity management

Related Documents