Shahram Nasir

Shahram Nasir, full-stack engineer in Toronto

Shahram Nasir, full-stack engineer in Toronto

Your favourite engineer's, favourite engineer

My cloud work

Software Engineer @ SOTI

My work in the cloud

I’m a full-stack engineer on an enterprise cloud management platform. I work across the Angular front end, the ASP.NET Core backend and the pipelines that ship them, and day to day that means working closely with AWS and Azure, especially EC2. I designed most of the interfaces and features I built.

Role
Full-stack, strongest on the design and product interface
Stack
Angular, TypeScript, ASP.NET Core, C#, Three.js, Vite
Clouds
AWS (EC2), Azure, Google Cloud
Delivery
Azure DevOps, PowerShell, Docker

Working with EC2

Building for servers that run in production means working with the whole life of an EC2 instance, not just a list of them. I’m comfortable across all of it:

  • Provisioning. Launching instances from Amazon Machine Images (AMIs).
  • Power and capacity. Starting, stopping and rebooting instances, scheduling reboots, resizing instance types (stop, change the type, start again) and expanding EBS volumes.
  • Monitoring. Instance state, region and IP addresses, EC2 status checks, and CPU metrics from Amazon CloudWatch.
  • Backup and recovery. AMI backups, restores, rollbacks and cloning.
  • Decommissioning. Final backups, termination, EBS deletion settings, and cleaning up DNS records and Elastic IPs.

It also means understanding both halves of server management: infrastructure changes made through the AWS APIs, and the work that happens inside the Windows servers themselves.

Across the stack

Front end: Angular and TypeScript

  • Working at scale. Understanding and implementing improvements for users that show actual quantifiable change
  • Operations interfaces. Configuration governance, data-collection rules and recurring scheduling.
  • Dashboards. Configurable dashboards and a clearer way to configure each widget.
  • Everyday workflows. Bookmarks, cloning, confirmations and feedback for the jobs people do every day.
  • Foundations. Modernized layouts with Tailwind, added light, dark and multi-theme support, and kept the codebase current through Angular upgrades.
  • Product analytics. Instrumentation that shows how features are used.

Backend: ASP.NET Core and C#

  • Targeted data-access and server-state changes in C#

Quality and delivery

  • Unit, integration and end-to-end tests, with substantive frontend tests in Jest.
  • Azure DevOps pipelines: commit validation, automated changelogs, patch-note integration and deployment automation.

Patch notes, without the technical writer.

The problem
Preparing patch notes meant working through each sprint’s tickets and writing everything by hand. It took hours, and the finished notes had no direct links back to Jira.
My contribution
I built a CI/CD workflow in Azure DevOps, using the open-source changelog generator git-cliff, that reads the commit history, files each change under the patch it belongs to, and links it back to its Jira ticket.
The tricky part
Inside the pipeline, existing git tags kept confusing which commits belonged to which patch. Feeding the generator the exact commits directly, instead of letting it walk the tags, made the output reliable.
What changed
Patch notes no longer need manual authoring or intervention, and the context behind each change is easier to find.

Working with customers

I’ve also worked as a customer-facing engineer: taking feedback from enterprise clients, turning it into backlog items, and shipping the changes in three-week agile sprints.

Platforms I work with

Cloud
AWS, Azure, and Google Cloud
CI/CD
Azure DevOps, Jenkins, GitLab, and Docker
Application
Angular, TypeScript, Tailwind CSS, ASP.NET Core, and C#
Testing and scripting
Jest and PowerShell

This is proprietary work, so there are no screenshots, code, or internal details here. I’m happy to go deeper in conversation.

Email me about this Next: Satellite

Lassonde Satellite (LASSAT), York University

Satellite software & leadership

I led the software team for LASSAT at York University. Our work covered embedded systems, sensor processing, and telemetry: reading sensors on the satellite and turning those readings into data people could use on the ground.

Leading the software team

I worked with the electrical, mechanical, and aerospace teams to keep our software work tied to what they needed. A sensor reading connects those disciplines: the board has to read it, the software has to preserve it, and someone on the ground has to know what it means.

Across the stack

Worked example. Follow one temperature reading from the board to the ground. The tools and debugging story below illustrate that path; they aren’t a record of LASSAT’s stack or a mission incident.

On the board: C++ and FreeRTOS

  • A C++ task running under FreeRTOS reads the temperature sensor over I²C at regular intervals and packs each reading into a telemetry packet.

On the ground: Python and pySerial

  • A Python tool reads the packets from a serial port with pySerial and decodes each temperature. Saving the raw bytes lets the same decoder replay a run without the board.

Quality and testing

  • Known packets. GoogleTest checks that the C++ encoder produces the expected bytes. pytest feeds those same bytes to the Python decoder and checks the temperature.
  • Bench test. Unplug the sensor and check that the ground tool marks the reading as missing rather than repeating an old value. Reconnect it and check that fresh readings resume.

Worked example: when −1 reads as 65,535

The problem
The sensor reads −1 °C, but the ground tool shows 65,535 °C. Above zero, the readings look right.
Following one packet
Compare the bytes the board sends with the bytes the ground tool saves. They match, and the checksum passes. Replaying the saved packet produces the same wrong temperature.
The tricky part
The checksum checks the bytes, not their meaning. The board sends a signed 16-bit temperature, but the decoder treats it as unsigned. The same two bytes mean −1 in one format and 65,535 in the other.
What changed
Reading the field as signed fixes the replay without changing the board. Regression tests now decode packets for −1, 0, and +1 °C so a lost minus sign fails a test.

The satellite in the scene is an illustrative model, not LASSAT hardware.

Email me about this Next: about me

Hi, I’m Shahram.

I’m a full-stack engineer in Toronto with a strong design sensibility. I care about how software looks and feels as much as how it’s built.

I’ve been a software engineer at SOTI since 2022. Before that I led the software team on York University’s Lassonde Satellite project. I graduated from York in 2023 with a degree in Specialized Computer Science and a minor in Mathematics.

I do my best work with other people. I like figuring things out together, I don’t take myself too seriously, and I’m ambitious about what we make.

Away from the keyboard I love to ski, play the guitar and enjoy playing volleyball. I also love space, and Interstellar in particular, which explains what you’ll find if you keep zooming out.

Get in touch See the CMS work

Let’s talk.

Email is the best way to reach me.

Write an email

Planets drawn in pure code

There are no photos or texture images on these planets. A small program runs for every pixel of each one, works out where on the sphere that pixel sits, and decides its colour with maths. The Sun, the Moon and Saturn’s rings are made the same way. Earth is the one exception: it uses NASA’s satellite maps.

The shared recipe

Noise for the surface. Smooth random values on a 3D grid, blended between grid points, then layered five times at doubling detail and halving strength. That gives the natural, never-repeating patchiness of rock, cloud and dust. Each planet gets its own seed, so no two look alike.

fbm(p) = ∑i=0..4 ½i+1 · noise(2ip)

Sunlight. Brightness comes from the angle between the surface and the direction to the Sun, softened a little at the edge of night so the line between day and night isn’t razor sharp.

light = clamp((n·L + 0.06) / 1.06, 0, 1)

Atmosphere. Planets with air get a coloured glow around the rim, strongest where you look through the most of it, on the day side.

glow = (1 − n·V)3

vec3 p = normalize(vObj);              // where on the sphere this pixel is
float n1 = fbm(p * 3.0 + uSeed);       // large patches
float n2 = fbm(p * 8.0 + uSeed + 3.1); // finer detail
vec3 col = mix(uA, uB, smoothstep(0.32, 0.7, n1));
float lit = clamp((dot(n, L) + 0.06) / 1.06, 0.0, 1.0);
vec3 c = col * lit * 2.0 + uAtmoCol * pow(1.0 - dot(n, V), 3.0) * uAtmo;

Mercury

Two layers of noise blend three greys into broad light and dark plains. A third, much finer layer darkens small specks, which read as craters. There’s no atmosphere, so no rim glow.

Venus

All cloud. The noise is stretched seven times along the latitude and bent by a second noise layer, which turns blobs into long, streaky bands. A thick golden rim stands in for its heavy atmosphere.

Mars

Rust and dark basalt tones come from two noise layers. The polar caps are just a rule: near the poles, blend to white, with a little noise on the edge so the caps aren’t perfect circles. A thin orange haze sits on the rim.

Jupiter

The bands are a sine wave of latitude, 26 of them, with noise added to the latitude so the edges wobble like turbulent cloud. A second, faster wave adds thinner belts. The Great Red Spot is a squashed ellipse painted at a fixed latitude and longitude.

band = sin((lat + 0.1·fbm) · 26)

Saturn

The same banded recipe as Jupiter, with fewer, paler bands. The rings are a flat disc. Four overlapping sine waves across its width make the fine ringlets, and a gap two-thirds of the way out is the Cassini Division. For the planet’s shadow, each point on the ring fires a line toward the Sun and checks whether it hits the planet.

Uranus

An ice giant: only eight faint bands, nudged by noise, in pale cyan, with brighter poles. Its axis is tilted 98°, so it really does roll around the Sun on its side.

Neptune

The ice-giant recipe again, in deep blue with ten bands and a strong blue rim. A dark oval in the south is its Great Dark Spot.

Sizes and distances are squeezed so the whole system fits on one screen. The planets are not to scale.

The math behind the black hole

Nothing in that scene is a picture. Every pixel fires one ray of light backwards from the camera, bends it around a non-rotating black hole, and asks what it ran into. It runs in a fragment shader, about 130 steps per pixel.

1. Units

Everything is measured in Schwarzschild radii, so the event horizon sits at radius 1.

rs = 2GM / c2 = 1

2. Bending the light

In Schwarzschild spacetime the path of a photon obeys the orbit equation below, with u = 1/r. The term on the right is the whole of general relativity here; without it light travels in a straight line.

d2u / dφ2 + u = 3⁄2 rs u2

That is awkward to step through in 3D, so the shader uses an equivalent form: treat the ray as a particle with position x and velocity v, and apply a pull toward the centre that depends on its angular momentum h, which never changes along the ray.

a = −3⁄2 rs h2 x / |x|5,   h = |x × v|

3. Stepping the ray

Each step updates the velocity, then the position. The step grows with distance, so the ray moves quickly through empty space and carefully near the hole.

v ← v + a Δt,   x ← x + v Δt,   Δt = 0.075 r

A ray stops when it falls inside r = 1 (that pixel is black), when it escapes past r = 30, or when the disk in front of it is already opaque.

4. Why the shadow is bigger than the hole

Light can circle the hole at the photon sphere, 1.5 radii out. Any ray aimed closer than the critical impact parameter spirals in, so the dark disc you see is about 2.6 times the size of the horizon itself. Nobody draws that circle; it falls out of the stepping.

bc = 3√3⁄2 rs ≈ 2.6 rs

5. The disk, and the arch over the top

The accretion disk is a flat ring in the plane y = 0, from 2.7 to 9 radii. Whenever a ray changes sides of that plane between two steps, the crossing point is found by interpolation and the disk is sampled there.

c = x0 + (x1 − x0) y0 / (y0 − y1)

The arch above the hole and the thin curve beneath it are the far side of the same flat disk. Rays passing over or under the hole are bent down onto the part of the disk behind it, so you see the back of the ring lifted into view.

6. Brightness and motion

Gas orbits faster the closer in it is, at a speed that falls off with the square root of radius. The side turning toward the camera is brightened and the receding side dimmed (relativistic beaming), using a Doppler factor raised to the third power.

β = 0.5 √(rin / r),   D = 1 / (1 + β t·d),   I ∝ D3

Here t is the direction the gas is moving and d the direction the ray is travelling. The streaks are noise, sheared by the Keplerian rotation rate so the inner gas laps the outer gas.

ω ∝ r−3/2

7. Bending the travellers

The explorer and the probe are not drawn on top of the scene. Each frame they are rendered into small images, and each image becomes a flat card inside the black hole’s space, facing the camera. While a ray is being stepped, every step also checks whether it crossed a card, with the same interpolation as the disk:

s = x0·f − c·f,   crossed when s0 s1 < 0

Here f is the camera’s forward direction and c the card’s centre. In front of the hole the rays reaching them are almost straight, so they look normal. Behind it the rays that reach them have curved round the hole, so the same figure is smeared into an arc over the top, often with a second, fainter image underneath.

8. The wormhole

The way in is ray traced too, through a different spacetime: the Ellis wormhole, the simplest exact traversable wormhole in general relativity, and the starting point for the one in the film. Here l is proper distance through the tunnel. Positive l is our universe, negative l is the other one, and the throat at l = 0 is a sphere of radius ρ.

ds2 = −dt2 + dl2 + (ρ2 + l2)(dθ2 + sin2θ dφ2)

Each ray stays in one plane through the centre. With its impact parameter b (how far off-centre it was aimed) and r2 = l2 + 1 in units of ρ, the geodesic equations come down to three lines, stepped with a second-order Runge–Kutta method:

dl/dλ = p,   dp/dλ = b2l / r4,   dφ/dλ = b / r2

Rays aimed with b < 1 pass through the throat and show the other universe. Rays with b > 1 swing round and come back out on our side, which is why the sphere is ringed by a squeezed, mirrored copy of the stars around it. At b = 1 light can circle the throat, and that ring is where the image piles up. Once a ray is far out it is a straight line again, so its final direction is φ + asin(b/r).

What about the traveller? Head straight in and the angular terms in the metric drop out. A freely coasting camera covers equal intervals of l in equal intervals of its own time, even at the throat. Its field of view stays fixed: the image opens up because the rays bend, not because the lens zooms.

The traveller moves at 18% of light speed relative to a local observer at rest. We convert the direction of each pixel into that observer’s frame before tracing it: motion changes the apparent direction of light (aberration). Rays that cross the throat sample a sky captured at Gargantua; those that turn back sample the sky beside Saturn.

How this translates to code

All of the above runs in one GLSL fragment shader, once for every pixel of the black hole. These are the actual lines, in the order they run.

Aim a ray through this pixel

The camera sits 20 radii out. Dragging the scene changes uView, which swings it round the hole. Each pixel turns its screen position into a direction.

// camera position, swung round by dragging
vec3 ro = vec3(0.0, sin(incl), cos(incl)) * CAM;
ro.xz = rot(uView.x) * ro.xz;
// this pixel's direction
vec3 rd = normalize(fw + rt * sc.x + up * sc.y);

Measure its angular momentum, once

This is h2 from section 2. It stays fixed for the whole ray.

vec3 hv = cross(ro, rd);
float h2 = dot(hv, hv);

Step, bend, repeat

The loop runs up to 130 times. The line marked bend is the acceleration a = −3⁄2 h2 x / |x|5, written with r2 * r2 * r for |x|5.

for (int i = 0; i < 130; i++) {
  float r2 = dot(p, p);
  // fell in (black), or escaped
  if (r2 < 1.0) { captured = 1.0; break; }
  if (r2 > 900.0 && dot(p, v) > 0.0) break;
  float r = sqrt(r2);
  // small steps near the hole, big ones far away
  float dt = clamp(r * 0.075, 0.04, 1.6);
  // bend
  v += -1.5 * h2 * p / (r2 * r2 * r) * dt;
  // move
  vec3 np = p + v * dt;
  ...
  p = np;
}

Did this step cross the disk?

If the height y changed sign, the ray went through the disk’s plane. The crossing point is found by interpolation, then shaded.

if (p.y * np.y < 0.0) {
  vec3 c = mix(p, np, p.y / (p.y - np.y));
  vec4 d = disk(c, normalize(v));
  // layer front to back
  acc.rgb += (1.0 - acc.a) * d.rgb;
  acc.a   += (1.0 - acc.a) * d.a;
}

Brighten the side coming towards you

Inside disk(): orbital speed, the Doppler factor D, and D3.

float beta = 0.5 * sqrt(RIN / r);
float dop  = 1.0 / (1.0 + beta * dot(tang, rd));
float intensity = (2.6 * pow(1.0 - u, 2.0) + 0.25) * pow(dop, 3.0);

Did it hit a traveller?

The same sign test, against each figure’s card. A hit looks up the figure’s image at that spot.

float d0 = dot(p0 - fig.xyz, fw);
float d1 = dot(p1 - fig.xyz, fw);
// same side both times: no crossing
if (d0 * d1 > 0.0) return vec4(0.0);
vec3 x = mix(p0, p1, d0 / (d0 - d1));
vec3 o = x - fig.xyz;
vec2 q = vec2(dot(o, rt), dot(o, up)) / fig.w;
return texture2D(tex, q * 0.5 + 0.5);

Lightly trimmed for reading (one helper variable renamed); the full shader is in src/scene/deep.ts.

Where it cheats

  • The hole does not spin. A rotating (Kerr) black hole drags space around with it and its shadow is lopsided; this one is the simpler Schwarzschild case.
  • The disk starts at 2.7 radii because it looks better. Stable orbits actually end at 3.
  • Colour is a hand-picked gradient from white-hot to deep red, not a temperature model, and there is no red or blue shift of the colour itself.
  • Second and later images of the disk near the photon sphere are faded out, because at screen resolution they turn into a jagged line.
  • The travellers are flat cards, so their lensed images are a good likeness but not an exact one for a solid body.
  • The wormhole is the plain Ellis shape. The film’s version smooths the throat into a longer tunnel with a lensing parameter; this one keeps the bare equations.
  • The ride speeds up the clock for distant approaches. Both skies are snapshots, not a simulation of light-travel delay or Doppler colour shifts. The far sky is oriented to match the landing view and blends into the live scene on exit.
  • Dragging the scene carries the virtual camera right around the hole, over the top and underneath, so the lensing really does change with the view.