// Josh Smith
Gallery

// SMITH, JOSHUA: COMPUTER_SCIENCE_

>

Computer
Science

[MAJOR]
PROJECT 01 / 04
this->website

> /CS

this->website

Password-protected photography gallery that converts Olympus .ORF raw files into a searchable, album-organised web gallery.

STACK
  • Next.js
  • TypeScript
  • MongoDB
  • Cloudflare R2
  • Python
  • rawpy
  • Vercel
TYPE
  • Personal Project
View on GitHub

// Features06 ITEMS

  • ORF → JPEG extraction via rawpy on upload
  • Two-tier password auth (gallery / admin), rate-limited, httpOnly cookies
  • Server-side API proxy. Key never reaches the browser
  • Paginated gallery (24/load), search, album filtering and renaming
  • Collectible photo cards: foil frame, one pointer-driven light, flip to a details back
  • Edit request form with filename pre-fill from gallery search

// Challenges04 LOGGED

CHALLENGE 01

PROBLEM
Vercel's 4.5 MB function limit blocked ORF uploads
SOLUTION
Presigned R2 URLs. Browser PUTs directly to R2, backend processes in place

CHALLENGE 02

PROBLEM
API key visible in browser JS bundle
SOLUTION
Next.js catch-all proxy route injects key server-side

CHALLENGE 03

PROBLEM
backdrop-filter silently killed 3D flip animation on Safari
SOLUTION
Moved glass styling to individual card faces, not the rotating container

CHALLENGE 04

PROBLEM
Password cookie missing after router.replace() on Safari
SOLUTION
window.location.href forces a full browser request, guaranteeing cookie availability
PROJECT 02 / 04
Computer Store Manager

> /CS

Computer Store Manager

C++ OOP inventory system for a computer store, using polymorphic class hierarchies, STL vectors, and file-based persistence.

STACK
  • C++
  • OOP
  • STL
COURSE
  • Object-Oriented Programming
View on GitHub

// Features06 ITEMS

  • Polymorphic hierarchy: Computer base class with PC, Laptop, and Tablet derived classes
  • Parses computers.txt into vector<Computer*> on startup via a factory function
  • Virtual displayinfo() method renders type-specific fields for each item
  • Search across inventory by multiple criteria
  • Staff alterations: add, delete, and update records with try/catch error handling
  • Virtual destructors and explicit delete loop prevent memory leaks on exit

// Challenges03 LOGGED

CHALLENGE 01

PROBLEM
Storing mixed PC/Laptop/Tablet types in one container without slicing
SOLUTION
vector<Computer*> base class pointers preserve derived types via polymorphism

CHALLENGE 02

PROBLEM
Safely deleting heap-allocated polymorphic objects
SOLUTION
Virtual destructor on Computer base class; final loop calls delete on every pointer

CHALLENGE 03

PROBLEM
Constructing the correct derived class from a flat CSV row
SOLUTION
addComputer() factory reads the type field and returns the matching derived object
PROJECT 03 / 04
Fuzzy Logic Inverted Pendulum Controller

> /CS

Fuzzy Logic Inverted Pendulum Controller

C++ zero-order Sugeno fuzzy controller that balances a simulated cart-pole inverted pendulum, using Yamakawa's combined-input rule base, with a live animated simulation and an exported control surface.

STACK
  • C++
METHODS
  • Fuzzy Logic
COURSE
  • AI
View on GitHub

// Features06 ITEMS

  • Zero-order Sugeno inference: trapezoidal membership functions, min for rule firing, weighted-average defuzzification
  • Yamakawa combined inputs: X = A·θ + B·θ̇ and Y = C·x + D·ẋ reduce four state variables to two
  • 5 fuzzy sets per input and a 5×5 fuzzy associative memory matrix giving 25 rules
  • 7 singleton force outputs from strong pushes (±950 N) down to zero
  • Runs against a second-order physics simulation of the cart-pole with real-time animated graphics
  • Control surface sampled across the input space and plotted to verify the rule base behaves smoothly

// Challenges03 LOGGED

CHALLENGE 01

PROBLEM
Four state variables would need a very large rule base to cover every combination
SOLUTION
Used Yamakawa's weighted combinations of angle/angular velocity and position/velocity, so 25 rules control the whole system

CHALLENGE 02

PROBLEM
Narrowing the membership trapezoids made the controller react sooner but start to oscillate
SOLUTION
Tuned set widths and output forces iteratively, trading reaction speed against smoothness

CHALLENGE 03

PROBLEM
The input coefficients A, B, C and D have no analytical values
SOLUTION
Calibrated them empirically (A = 0.8, B = 0.08, C = 0.13, D = 0.12) until the controller balanced the pendulum
PROJECT 04 / 04
Portfolio Optimisation App

> /CS

Portfolio Optimisation App

Native Android app in Kotlin and Jetpack Compose that fetches live market data, runs a Monte Carlo portfolio optimiser on-device, and stores price history and saved portfolios offline.

STACK
  • Kotlin
  • Jetpack Compose
  • Room
  • WorkManager
  • Coroutines
COURSE
  • Mobile App Dev
View on GitHub

// Features07 ITEMS

  • Jetpack Compose UI: weight sliders, efficient frontier drawn on a Canvas, history and constraint dialogs
  • MVVM with a ViewModel and repository layer over a Room database and DataStore settings
  • Yahoo Finance chart API client on Dispatchers.IO, parsing adjusted closes with a CSV import fallback
  • Offline cache of prices in Room so the app still works without a connection
  • WorkManager job every 12 hours (network required) that sends a notification when portfolio risk rises
  • Saved portfolios with restore, delete and share-as-text analysis
  • Unit tests for the portfolio maths and the market data parsers

// Challenges03 LOGGED

CHALLENGE 01

PROBLEM
Network calls on the main thread would freeze the UI
SOLUTION
Ran all fetching inside coroutines on Dispatchers.IO, with timeouts and a per-symbol failure report

CHALLENGE 02

PROBLEM
Moving one weight slider had to keep the portfolio total at 100%
SOLUTION
Rebalance function that scales the other weights proportionally, or shifts them evenly when shorts are allowed

CHALLENGE 03

PROBLEM
Reopening the app must not reset the background risk-check schedule
SOLUTION
Enqueued it as unique periodic work with the KEEP policy