But even the fact that you have to decide on the buffer size is a matter of understanding the theory. Choosing to multiply by 5 too. Why is it 5 and 12? Why the buffer size is not the half or double the size that it has? How can you prove that you have chosen the correct values if not by theory?
if buffer not full:
wait (time for 5 writes);
write to 5 * read_size to buffer;
Sure, you could do it more complex, but then you create fragile code at a spot when a simppler solution would work fine.