Laptops are computers aswell, I think you mean desktop ;) To me it doesn't really matter as long as Im using a mac and not a PC. I'd probably prefer a laptop for portability.
When it comes to coding, it's truly a matter of personal preference. For me, nothing beats the feeling of sitting in front of a laptop and hammering out code. The portability of a laptop makes it so easy to take a project anywhere I need, and I'm always able to stay up-to-date on my work or projects as needed. That being said, many developers still prefer the power and flexibility found in computers when creating code. Boasting more computing power than their laptop counterpart, computers are often responsible for larger and more intensive tasks such as game design or AI programming. Ultimately, depending on what you need your code to do, either option could be suitable!
AskMiku