// Hi, I'm Said Elhefny
Junior Software Engineer · Systems & Open Source · Riyadh, Saudi Arabia
const status = "open to junior software engineering roles";
I build reliable, efficient systems and desktop applications — from a multithreaded C++20 cross-exchange market-data scanner and a historical backtesting engine for crypto markets to a full project-management dashboard for freelancers. My work spans C++, Python, and Java, usually with a database underneath, a clean UI on top, and real attention paid to the details: concurrency, data persistence, error handling, and secure API integrations.
I finished high school in July 2026 and start a BS in Software Development at the University of Silicon Valley in 2027. Until then I'm building — currently CyberShadow, a local-first enterprise AI knowledge platform — while taking on freelance projects through Upwork. I completed Harvard's CS50x in 2026. I'm drawn to open source and want to build a long-term engineering career contributing to widely-used software like Ubuntu.
// selected work
// Experience
experience.md
Upwork · Remote · Riyadh, Saudi Arabia
Design and build custom desktop productivity tools and data utilities for clients, owning each project end-to-end — from scoping requirements through development, testing, and delivery. Work spans Python and Java, typically backed by a local SQLite database with a clean, maintainable UI layer on top.
- Independently manage the full project lifecycle: requirements, architecture, development, testing, and client communication
- Translate loosely-defined client briefs into scoped, working software
- Delivered production-quality desktop applications, several of which are now published as open-source references — see Projects
// Education
education.md
BS in Software Development · Incoming student.
Harvard's introduction to computer science and programming — completed alongside my own projects. view certificate →
High School Diploma · Canada
Completed a college-preparatory curriculum with a strong focus on mathematics and computer science, graduating on July 12, 2026. view diploma →
// Projects
a look at what I've shipped
A cross-exchange (Binance/Kraken) HFT arbitrage scanner written in C++20. Keeps live order books from multiple exchanges synchronized and detects spread opportunities in real time, behind a risk-gated execution engine.
- Real-time order book synchronization with checksum validation — Kraken's checksum is tested against the exchange's own worked example
- One thread per exchange hands events to a dedicated strategy thread through a concurrent queue; simdjson parsing and preallocated fixed-array order books (no locks, no per-update allocations) keep the hot path lean
- Depth-weighted spread detection that accounts for per-venue taker fees and a slippage buffer — a crossed quote alone never triggers a trade
- Every order passes a risk gate (open-order cap, rate limit, exposure ceiling, kill switch), with legging protection on the two-leg execution
- Fixture-based test suite with no network dependency, including HMAC signing verified against RFC 4231
- Binance execution verified live on testnet; Kraken execution unverified due to the lack of a Spot sandbox
- Design rationale and bug-fix history are documented in DESIGN.md and CHANGELOG.md
A local-first enterprise AI knowledge platform. Employees ask questions over company documents and get grounded answers with citations, while access control is enforced before retrieval and before anything reaches the model.
- Designed so authorization happens before retrieval and context construction — the LLM never decides who can see what
- Hybrid semantic + lexical retrieval with evidence-linked citations, scored by a benchmark that separates retrieval, grounding, and security
- Built for local/on-prem models via Ollama, with a visible privacy mode and no silent cloud fallback
- MCP server that exposes the same permission layer to compatible AI clients through scoped, revocable, read-only tokens
- Tool-calling assistant that can search permitted documents and calculate exactly; file writes are only proposed and need explicit, signed human approval
- Prompt-injection defence evaluated with and without the sanitizer; on a fresh 67-question synthetic set it scored 63/67 with zero unauthorized answers and zero injection leaks (single run)
- Company-network deployment profile with internal-CA HTTPS, SQLCipher database encryption, encrypted group and direct chat, and audited admin controls
A desktop personal finance manager built with PyQt6, pandas, and matplotlib. Tracks income, expenses, savings, accounts, and categories through a live dashboard, plus a full suite of optional AI features backed by the OpenAI API.
- Multi-file CSV import, manual entry, and multi-account support
- Dashboard cards, income/expense trend chart, and expense distribution pie chart
- Editable savings goal tracking with chart export to PNG
- Optional AI insights, budget advice, fraud checks, chat, and category suggestions — thread-safe asynchronous OpenAI calls with a local offline fallback engine
- Autosave with session restore and automatic update checks
A system utility that silently organizes files in the background. Developed in Python with interactive configuration dialogs built using PyQt, it routes files to custom local or cloud destinations by type — controlled entirely from the Windows system tray.
- Watches multiple high-traffic folders at once, mapping categories to custom drives or cloud folders
- Recognizes and routes 10 file categories, from images and documents to code, archives, and executables, with optional exact file-type subfolders (PDF/, DOCX/)
- Smart System Scan auto-detects Windows/OneDrive folders, with chronological sub-sorting by year/month
- Windows registry checks for automatic startup persistence, for a seamless, install-and-forget experience
- Rotating error log handlers plus collision handling and safety nets to skip locked files
A cryptocurrency backtesting engine for evaluating trading strategies against historical market data. Pulls OHLCV candlestick data via ccxt, caches it locally in SQLite, and simulates a moving-average crossover strategy with realistic order execution.
- Realistic trade execution modeling — next-bar open fills, exchange fees, and slippage
- Advanced gap-detection that extrapolates the exchange's timestamp grid to catch missing candles without false positives
- Full trade ledger with equity curve charting and exportable JSON/CSV performance reports
- Fully configurable via CLI flags — symbol, timeframe, moving-average windows, starting cash, fees, and slippage
A comprehensive desktop application for managing freelance workflows end-to-end — clients, projects, time tracking, and invoicing. Built with Java and JavaFX, styled with AtlantaFX, with data persistence handled locally using SQLite and JDBC.
- Dashboard with monthly revenue, active projects, hours tracked, and a revenue trend chart
- Time Inbox: optional local window-activity tracking, reviewed and approved before it hits the billing ledger
- Invoice generation from unbilled hours, with paid-status tracking and PDF printing
- One-click Markdown project status reports and pipeline value projection
- Engineered a Javalin webhook endpoint with HMAC signature verification to securely process and validate backend transaction events, documented in a payment QA report covering a localhost-only sandbox and verified reconciliation and idempotency scenarios
// Skills
skills.json
// CyberShadow dev log
devlog.md · weekly entries drawn from the project's engineering log · last updated Nov 6, 2026
Current state as of the latest engineering-log entry (Nov 5, 2026). CyberShadow is a local-first enterprise AI knowledge platform, still in development. All quality numbers below are single runs on synthetic benchmark corpora, not production measurements. See the project card for the full description.
- Authorization runs before retrieval and context construction, so the model never decides who can see what
- Hybrid semantic + lexical retrieval with evidence-linked citations, scored by a benchmark that separates retrieval, grounding, and security
- Built for local/on-prem models via Ollama, with a visible privacy mode and no silent cloud fallback
- MCP server exposing the same permission layer to compatible AI clients, with scoped, revocable, read-only tokens
- Tool-calling assistant: file writes are only proposed, then created after the person reviews the full content and approves a signed token; optional web reading is off by default and limited to an allow-list
- Latest fresh benchmark (67 questions, poisoned documents included): 63/67 correct (94.0%), 41/44 on the held-out split, 0 unauthorized answers, 0 injection leaks on the product path
- Known limits: a hardened prototype, not an enterprise-ready security boundary. The small local model still gives some wrong answers and false refusals, and the single-machine design (SQLite, exact vector scan) is planned to move to pgvector before the corpus grows past roughly 5,000-10,000 chunks
- Compared three local models (llama3.2:3b, qwen2.5:3b, qwen2.5:7b) on a fresh 55-question held-out set under identical settings. After correcting an answer key that required a fact the question never asked for (found by reading failures and recorded as a dated amendment, not edited silently), the rows scored 52/55, 51/55 and 54/55. None of the differences is statistically significant at that size, so the default model stays llama3.2:3b.
- An 8B model could not be benchmarked on this laptop (memory paging, about 0.19 tokens/s), so no 8B result is claimed. A 7B run I had predicted would be impossible worked after all, and the earlier claim was corrected in the log rather than rewritten.
- Authored company_v7: a fresh 67-question university corpus (25 documents, calibration/held-out split by department, four poisoned documents). Result: 63/67 (94.0%) overall, 41/44 on the held-out split, 0 unauthorized answers, 0 injection leaks. With the sanitizer switched off the model alone repeated a planted payload in two held-out answers, so the filter is load-bearing.
- Retrieval cost controls (ADR-020): embeddings go out in batches of up to 64 and scoring streams in 512-row batches. On 2,000 synthetic chunks, cold peak memory fell from 70.6 to 15.0 MiB in plaintext and from 99.8 to 16.3 MiB with storage encryption (79% and 84% lower), and real-model vectors returned identical top-5 results.
- Latency and scaling: warm p95 is about 1.4 s at 2,000 chunks with the default batch size. A 10,000-chunk probe measured about 5.9 s warm p50, so the exact scan is fine at today's size but is rejected for the 200,000-chunk target; pgvector is planned before the authorized corpus reaches roughly 5,000-10,000 chunks.
- Document revision history (ADR-021): re-uploading a changed file keeps the previous revision as superseded instead of deleting it. History is permission-filtered, admins can restore an old revision, and Ask has an explicit, labelled history mode. Backend suite: 628 passed, 4 skipped.
- Benchmark harness fix: a crashed run can no longer overwrite the last good baseline used for paired comparisons.
- Company-network deployment profile: Caddy serving HTTPS with an internal CA, the API reachable only on a private network over verified TLS (no published host port), SQLCipher database encryption plus content encryption, and encrypted backup and restore.
- Added an HTTP-level two-user isolation regression: each user sees only their own folder, documents and search results, while an admin control search sees both, which shows the isolation comes from authorization and not from an empty index. Two disposable encrypted pilots over HTTPS then passed (isolation, encrypted storage, no plaintext markers in the raw database bytes) and were removed afterwards.
- Group chat and direct messages: encrypted at rest, rooms follow current group membership, and coworkers can message only while they share a group. Access is rechecked on every read and send, and file links are hidden when a reader loses document access.
- Admin controls: multi-group onboarding validated before the account is created, role changes and deactivation with confirmation and self-lockout protection, password change and admin reset (both revoke sessions and MCP tokens), and group and folder renames that preserve IDs, permissions and history.
- Added a Linux CI job. Reproducing it in a clean container found a real platform failure: a disabled assistant returned 422 instead of 403 because the request body was validated before the kill-switch check. Fixed by moving the check into the route dependency. Result: 547 passed, 3 skipped.
- Benchmarks: froze the company_v5 split manifest after finding that recalculating it had silently moved questions between splits. A deterministic procurement-threshold parser took held-out answerable accuracy from 38/42 to 41/42 (three fixes, no regressions, not statistically conclusive at this size). A scorer false negative on document-scoped abstentions was corrected and saved reports were rescored without changing model outputs.
- Nov 1: first run of company_v6 scored 36/38 answerable and was identical across three repeats. Reports now record the generation seed, a hardware fingerprint and tokens per second.
- Signed off the tool-calling assistant against acceptance tests: 34 passed as written with no test edited. It can search the signed-in user's permitted documents and calculate exactly; file creation is only proposed, using an HMAC token bound to the user, the tool and the exact arguments, and the file is written only after the person reviews and approves it. The kill switch was confirmed live (403 when disabled, forged approval rejected with 422).
- Verified the whole loop against the real llama3.2:3b: it chose the calculator for 234 x 47 and quoted 10,998, searched documents with its own query and answered with the real source, and proposed a file that was created only after approval.
- Re-ran company_v4 after the answer-support fixes from the previous week; quality metrics matched the earlier reports, and three full-system runs produced byte-identical answers across all 96 questions.
- Security and retrieval review (ADR-012, ADR-013): browser sessions moved to an HttpOnly, SameSite cookie with server-side revocation, plus trusted-proxy client IPs, upload caps and security headers. Retrieval now authorizes before parsing, scores vectors in one matrix operation with a bounded cache, and fails closed on malformed vectors. Suite: 417 passed.
- Added opt-in, read-only web reading. It is off by default and refuses to start without an explicit host allow-list. One server-side GET per read with no cookies, credentials, JavaScript or forms; HTTPS by default; private, loopback and metadata addresses refused; the validated address is pinned and every redirect is rechecked; size, time and redirect caps apply; page text is quarantined like documents. The UI stops claiming to be air-gapped while it is on. Verified live: an allow-listed page was read, while 127.0.0.1 and a redirect to an unlisted host were refused. Suite: 472 passed.
- Benchmarks: per-part retrieval for compound questions (ADR-015) moved company_v4 answerable accuracy from 65/69 to 67/69 and multi-document accuracy from 0.70 to 0.90. Three further prompt-wording experiments were measured and reverted because each traded one error for another. A query-embedding cache (ADR-016) cut repeat-query embedding from about 2.75 s to about 0.01 ms.
- The first company_v4 run on the real model scored 0.765, and the model alone repeated a planted canary in 3 of 7 attack questions, an attack class the previous set could not show. Sanitizer v2 took leaks from 3 of 7 to 0 at the cost of one question. The same review found an answer key that matched "50" inside "50,000".
- Rewording the system prompt to answer whenever an excerpt supports it raised correct answers from 0.750 to 0.897 and cut false refusals from 13 to 1, at a recorded cost: correctly declined questions fell from 23/27 to 17/27. Three follow-up changes (stricter prompt, softer prompt, a different 3B model) were measured and none shipped, because each near-miss decline was paid for with about one paraphrase refusal.
- Found a 500 on the MCP token list (naive SQLite timestamps compared with aware ones) while reviewing the bring-your-own-key and scoped-token work. Fixed it with one shared token-active predicate, labelled tokens, and audit events that record the personal provider without any key material.
- A full review pass found two real defects in the answer support check. A word boundary before n't meant contracted hedges such as "isn't stated" slipped through and the answer was kept instead of withheld. Separately, 12.50 in an answer was flagged as unsupported against 12.5 in the source. Both were fixed with regression tests, and the numbers measured earlier were marked unverified until re-run. Backend suite: 347 passed.
- Frontend: live UX audit and several rebuild rounds. Progress is staged from real stream events, citations open a drawer with the cited passage highlighted, destructive actions need an armed second click, and each answer carries a privacy badge (processed locally or sent to a named provider) plus match percentage and visible-to roles per source. Lighthouse on the login screen: accessibility 78 to 100, best practices 83 to 100. On Oct 18 the app moved to a componentized redesign with every trust feature preserved.
- A company_v3 run on the real model showed that evidence and citation metrics were scored over all top-K chunks while the model saw only one. Adding model-visible metrics dropped a reported 1.0 to 0.74. A planted instruction in an authorized document made the model repeat a canary (injection leak rate 0.33); authorization tests at the real prompt boundary all held.
- Fixed a scoring bug where the canned refusal could satisfy an answer key. Added an instruction-sentence sanitizer (ADR-008) that took the leak rate from 0.33 to 0.0; a system-prompt hardening alternative was measured and reverted (two fewer correct answers, two more false refusals).
- Document lifecycle (ADR-007): conflict accuracy 0 to 0.75 and stale-source rate 0.75 to 0. A context-limit sweep showed extra chunks hurt every ordinary question kind and help only multi-document ones, which led to compound-question evidence selection (ADR-006) and 28 to 31 correct.
- Measured embedding task prefixes, found them slightly worse and left them off (ADR-010). Added a closest-passage fallback (ADR-009): 9 of 11 refused answerable questions now show the answering sentence. A first version passed tests on raw documents but failed through the API because chunk text collapses newlines; the fix and a regression test are recorded.
- Added a re-index command that converts each document in its own transaction so failures keep the old index. Authored company_v4 (29 documents, 95 questions, six departments, two poisoned documents written to evade the first sanitizer) with an integrity test that checks every expected fact against the document it cites.
- Installed the declared development dependencies and ran the full backend suite (25 passed, 2 intentionally skipped). The real runtime harness then passed local embedding, grounded generation, streamed answers, MCP search and employee/admin access checks. The first real-model company_v1 benchmark scored Recall@1/3/5 and MRR of 1.0, with no false no-context answers and zero unauthorized retrieval or answers.
- Citation evidence accuracy now verifies the cited excerpts directly instead of reusing the answer-quality result.
- Reorganized the repository by purpose (ADR-005) with stale-link checks, a passing frontend build and 70 backend tests passing; legacy benchmark artifacts were retained for reproducibility.
- Added the versioned company_v2 corpus (13 documents) and a dataset-selectable runner. Its deterministic baseline exposed an emergency-change retrieval miss at K=3, which is kept as a regression target instead of being hidden with a query-specific rule.
- Started from an empty workspace and built an offline-first FastAPI and React prototype. The baseline used deterministic local hashing vectors so it runs with no network egress, documented as not production retrieval quality. A remote web-font import was removed to keep the local-mode network boundary, and no credentials are hardcoded: bootstrap accounts come from untracked environment configuration.
- Added a prompt-injection test and a defensive filter, recording the residual risk instead of claiming the problem is solved. Regression testing also found that filename normalization accepted ../ paths; validation now rejects path separators before parsing.
- Added configurable Ollama embedding and generation providers with a loopback-only guard in local mode. With Ollama and Docker unavailable on the host at that point, real-model checks were recorded as environment-blocked by a runtime-check tool (PASS, FAIL, SKIPPED, ENVIRONMENT-BLOCKED) instead of being faked with a substitute provider.
- Query normalization plus lexical and vector fusion fixed cases the hashing provider could not relate, such as "annual leave allowance" and "vacation", without changing benchmark inputs.
- First real-model run (Sep 24): retrieval ranked the expected document first for every answerable question, yet llama3.2:3b still refused. Root cause: combining "untrusted reference material" wording with the exact refusal text made the model refuse grounded answers, and sending all top-K chunks added false refusals. After rewording the prompt and defaulting to one chunk of generation context, all seven answerable questions were answered grounded with Recall@1 and MRR of 1.0 and zero unauthorized answers.
// Contact
contact.txt
if (you.areHiring()) { reachOut("said.m.n.w.o@gmail.com"); }