DEV Community


Discussion on: What is the ideal length of a code for you?

kovah profile image
Kevin Woblick

I think it's hard to find a fixed number, but in general: if you have to scroll too much, you should split up the code. Functions itself should never reach a length where you have to scroll through the code (except for like 12" laptops maybe). It's not that hard to move structures like loops out of a function and move it to new function.