← Back to overview
Bridging Physical Sciences and Modern Software Development
When I began my degree in Physical Sciences at South Eastern University of Sri Lanka, most people assumed my trajectory would stay purely within academic laboratories or textbook theoretical physics.
However, as I dove deeper into pure mathematics, wave mechanics, and classical dynamics, I realized something fundamental: physics and software engineering are governed by the exact same instinct — modeling complex reality through clean, verifiable systems.
1. First-Principles Thinking in Code
In physics, when an equation fails to balance, you don’t guess random numbers; you trace back to fundamental laws — conservation of energy, boundary conditions, and state transitions.
In modern web development with TypeScript and Next.js, the exact same discipline applies:
// Modeling a physical state transition with strict TypeScript unions
type PhysicalState =
| { status: "ground"; energyLevel: 0 }
| { status: "excited"; energyLevel: number; wavelength: number }
| { status: "ionized"; energyLevel: number; emittedElectronVelocity: number };
function computeEmission(state: PhysicalState): string {
switch (state.status) {
case "ground":
return "Stable ground state. No radiation emitted.";
case "excited":
return `De-exciting with photon of wavelength: ${state.wavelength} nm`;
case "ionized":
return `Ionization threshold crossed. Electron velocity: ${state.emittedElectronVelocity} m/s`;
}
}
Strong typing eliminates impossible states before your code even reaches execution.
2. Dynamic Systems & Component Lifecycles
In physical systems, changes are reactions to forces over continuous time. In the React ecosystem, components react to changes in state, inputs, and environment.
Understanding differential equations gives you a profound intuition for:
- Rate-limiting and debounce: understanding velocity and impulse.
- Spring and layout animations: physical damping coefficients and stiffness rather than linear timings.
- State derivations: treating UI as a pure projection of incoming data vectors.
3. What’s Next
Having concluded my second year in Physical Sciences, my goal is to continue blending deep scientific curiosity with high-craft software engineering — building tools that make data, computation, and interactive graphics feel alive on the open web.