Subjects / Coding
Learn to code from YouTube tutorials without getting stuck
In coding tutorials one small detail changes everything. When the output surprises you, pause and ask Cof about the line on screen. It reads the frame and what the teacher just said.
“so let's write for i in range(1, 5): print(i) and run it. And you can see we get 1, 2, 3, 4”
Youwhy doesn't it print 5?
CofBecause range stops before its second number. So range(1, 5) gives 1 through 4; use range(1, 6) to include 5.
An example conversation with Cof.
Or ask on the board
compalecof is an AI tutor that explains by drawing. On the board, ask your question and Cof draws the answer step by step on a notebook page, like a teacher at a whiteboard. It opens in your browser, nothing to install.
What Cof writes on this page: How binary search works
- Sorted list: 1, 3, 5, 7, 9, 11, 13. Target: 9.
- Pick the middle: check 7. Since 9 is larger, discard 1, 3, 5 and 7.
- Halve again: in the remaining half check 11. Since 9 is smaller, keep only the values below 11.
- Find the target: only 9 is left, so the search is complete.
- Key idea: each comparison with the middle value removes half of the remaining candidates.
How Cof helps
It explains the line on screen
“Why doesn't it print 5?” is enough. Cof sees the code in the frame and answers about that exact line.
It gives you code when you ask
Ask for a fixed version or a small example and Cof writes the code in its answer, not just a description.
Any language, any level
Python, JavaScript, C#, SQL and more, from first lessons to framework tutorials.
How to start
- Add compalecof to Chrome and sign in with a free account.
- Open a YouTube video and click Cof, the little coffee cup, to wake it up.
- Pause where you got stuck and ask in your own words.
Free plan: 2,000 credits a month.
Questions
Can Cof read code in the video?
When it needs to, Cof looks at a still frame of the video, so it can read the code that's on screen at that moment, together with the subtitles.
Does Cof write the whole project for me?
Cof can write code when you ask, but it's built to explain, so you understand the tutorial and can keep going on your own.