Making a static recommender respond to the shopper, when the median visitor has viewed exactly one product and left.
computer science, decoded
compscai
In-depth write-ups on how things actually work, from web security and database internals to performance tuning and machine learning. Real problems, real code, no fluff.
Latest posts
Browse topics ›Content-based recommendations for a jewelry catalog with no click data to learn from. TF-IDF in SQL, why grouping products is a graph problem, and a sliding carousel built with no JavaScript at all.
Same query, same code, a thousand times faster. How a B-tree index lets the database skip reading the whole table, what it costs you on writes, and how EXPLAIN tells you where one actually belongs.
Nothing stopped one visitor from submitting a thousand comments a minute to this site, except a rate limit. What rate limiting protects against, how fixed window, sliding window, and token bucket counting differ, and where to enforce it.
You never store the password, you store a fingerprint of it. What hashing actually does, why a salt makes every fingerprint unique, why bcrypt and Argon2 are slow on purpose, and the two PHP functions that handle all of it.
Not a live USB with persistence. A real Ubuntu install with a full desktop, living on half of a 5TB WD Black external drive while the other half keeps doing everyday storage duty. Why I wanted it, how I split the drive, and the one install step that actually matters.
About me
compscai is where I document what I'm learning in computer science as I move from student toward the professional world, written so the concepts land easier for the next person too.
I'm a current computer science student. As I work through real problems and pick up the things that classes and tutorials tend to gloss over, I write them down here: the concept in plain language, the actual code, the trade-offs, and why it matters. The goal is to make the harder parts more accessible and genuinely easier to understand, the explanation I wish I'd had.
And if you're anything like me, you hit something new, like pointing a site at a domain or wiring up a database for the first time, and wish someone would just explain it simply, start to finish, without the hand-waving and the twelve open tabs. That is exactly why I made this.
These are the topics I'm focused on right now:
Have a better approach, a correction, or a question? Leave a response on any post; I read them.