Faisalaffan Blog
Faisalaffan Blog
Category

Engineering

Showing 12 articles published in this section.

Best Time to Buy and Sell Stock: From Brute Force to One-Pass O(n)

Master the classic coding interview problem 'Best Time to Buy and Sell Stock' with step-by-step explanation — from the naive brute force approach, recognizing patterns, to the optimal one-pass O(n) solution using sliding window / two-pointer technique. Complete with array visualization, complexity analysis, and the intuition behind every decision.

Faisal Affan
Faisal Affan
Integer to Roman: The Greedy Mapping That Always Shows Up in Interviews

Breaking down the integer to Roman numeral conversion problem — from basic Roman numeral rules, the subtractive notation pitfalls (IV, IX, XL...), to a clean, interview-ready greedy O(1) solution. Complete with mapping table, step-by-step visualization, and why this approach is optimal given the 1-3999 constraint.

Faisal Affan
Faisal Affan
Portfolio Strategy by Career Level — Junior to CTO

Your portfolio should reflect your seniority level, not just list every project you've touched. Junior engineers sell potential and fundamentals. Senior engineers sell depth and architecture. Staff engineers sell leverage. CTOs sell business outcomes. Here's exactly what to put in your portfolio at each level — with concrete examples and a universal format you can use today.

Faisal Affan
Faisal Affan
Modern AI Architecture: End-to-End

From the first user query to the response stored in the database. A complete guide to layers, tools, request flow, learning roadmap, and real-world production implementation — including the newly released Google ADK.

Faisal Affan
Faisal Affan
OpenSpec: Stop 'Vibe Coding', Give AI a Clear Roadmap

Vibe Coding is like asking a contractor to build a house without a blueprint — the result? Chaos by the third month. OpenSpec arrives as an 'architectural blueprint' for AI coding, shifting the paradigm from random chatting to structured Spec-Driven Development.

Faisal Affan
Faisal Affan
Stop Being a Code Monkey: Why Business-Savvy Developers Earn 3x More

Are you 'just' working on Jira tickets while other developers are shaping product decisions and leveling up 3x faster? Here is the framework that transformed me from a regular backend engineer into someone who owns business outcomes — with real-world production examples.

Faisal Affan
Faisal Affan