I always get a laptop because I like to code in unusual places - in bed, on the floor, on the couch watching TV, sitting out on my balcony like now. You can't really take a desktop with you and sit it down on the sofa. Same applies to the small-laptop/big-monitor approach, which sounds great in theory but doesn't really work for my particular situation.
Agreed... i can sit back or work at a desk... or even take my laptop outside and sit on the stairs to work if the weather is good.
But then you might also get a more powerful desktop for the same price. So in heaven you would buy both... until then i suggest paying a little more and get a good config laptop.
HP has a very decent and durable machines in the corporate line. I have one that operates practically 24/7 for two and a half years now. This particular one I've bought after my desktop workstation (IBM IntelliStation, double Xeon, Wildcat graphics, 15K drives..) died after just little more than one year in service. So much for desktop vs. laptop durability. I also prefer the keyboard (and rubber mouse buttons) to the ThinkPad's design.
Buying form corporate line has an additional benefit that one can use a docking station for all the external monitors, hard drives, mouse, keybord, speakers and the ethernet cable. Of course I know ThinkPads do have a docking connector too, but Macs do not and I hardly understand how people can trade convenience and commodity price for a shiny paint that wears off from sweat in under a year and a shiny GUI that annoys me (maybe it's just me) almost as Windows does.
You certainly can get away with programming on a laptop, but I find the lack of screen real estate causes me to work a lot slower. The best option, for me, is getting a very powerful laptop with a connector for a second monitor while you're at home or work.
A laptop may be enough for development. However, it feels very comfortable if you have a desk with a large screen (or screens) and perhaps an external keyboard and mouse that you can all attach to the laptop for heavy duty work. (As well as external hard drives and whatever tertiary storage you may need.)
If you are going to carry it around, make sure to back up religiously. Laptops often tend to be abused and thus have a noticeably shorter lifetime than desktops.
And in some cases, as people have mentioned, you may need a desktop simply to get as much power per buck as you can -- depending on your project.
I use both because apparently I like to waste money. I have dual 20" and 24" hooked up on my desktop (which has a totally sweet humanscale keyboard tray) as well as a 12" thinkpad tablet.
When I'm sitting at my desk, I feel pretty awesome, I can fill my screens with whatever I'm working on etc. If I for some reason want to work outside or need to meet to discuss something the thinkpad is decent-ish (1400x1050 resolution) for coding and note taking.
I will admit I don't understand the need to lie on the couch and code. I feel like its best to separate out tasks and the places they are performed. When I'm sitting at my desktop I am either playing a computer game or programming. If I'm lying on the couch I'm watching TV. Typing on the couch seems hell on the wrists. (And doing so in bed hurts the quality of your sleep).
(Sidenote: I worked at a startup where I just brought in my thinkpad. I ended up borrowing a spare monitor, keyboard and mouse just so I wouldn't go crazy. I felt like I couldn't fit any code on my screen otherwise.)
Let me take my situation to explain:
I see myself as a non-traditional web developer during my own free time. I like to work at various locations (my desk, sofa, bed, outside, library, ...). But at my normal, regular work, I'm just a traditional developer who demanded a dual screen set-up at the job interview.
So you have to ask yourself, are you the more traditional type who does work at a desk? You're better off with a large screen area/desktop. If your desk doesn't matter for you and you're just going to work on a lot of various locations I'd say, go for the laptop. Just for the record, you will notice some people said they used laptops with external monitors. You should ask yourself if you will ever use the machine as a real laptop, because if you don't, you'll probably be off cheaper with a regular desktop due to better upgrade opportunities/longer life in general.
Working on a laptop to me feels like trying to paint my hallway through the keyhole.
There is so much going on when writing software that even with two monitors I feel pretty cramped, as soon as I switch to a laptop I'm lost.
There was a time when I could do dev work on a laptop. No IDE required, no browser required (for testing or to look up documentation), just a text editor in a shell window. That time is now probably more than 5 years in the past and the more I'm doing this the more screen real estate I feel I need.
The other day I was wondering how hard it would be to connect four monitors instead of just 2 and how I would place them on my desk to get any kind of improvement over the current situation (with windows overlapped at least 3 deep on each monitor).
It all depends on what you want to develop. For me, my number one priority is RAM and CPU since I have to do a lot of indexing. Since this is the case, a desktop machine would make the most sense for me.
Without any additional information, we really won't be able to help.
This is absolutely the right answer. If you've got test servers or a render/compile farm or something to test your work on, then obviously you only need a machine that can support your editor, server access and lookup needs. On the other hand, if you're limited to one machine and you're doing complex work, you're going to need something more powerful, laptop or desktop. The question then becomes how much more you're willing to pay for the extra portability of a laptop, especially when it's a heavy desktop replacement.
This is true, but the saying "time is money is also true". If you are in a situation where you can throw a thousand dollars at something that will save you half an hour in turn around for each build, then that would probably be a wise choice.
However once things have solidified, it would then make sense to look at optimization. You definitely have to be smart about your time, especially if you value it. Otherwise you can find yourself spending a week to optimize, plus test to gain very little performance.
I'm a strong believer in throw hardware at a problem if you can in the short term to buy you valuable time elsewhere.
Depends on how much testing you do. I run regression tests on multiple-OS's so I use a lot of VmWare and a high-spec tower with dual 24" screens. The laptop is great for demos and coding between meetings, waiting, etc.
I prefer and recommend a proper keyboard and mouse. Even the best laptop keyboard will give you CTS/RSI eventually. I do about 80% of my work on the tower with full size keyboard and 20% on the laptop. Of course your mileage may vary.
I bought a desktop because of the traditional powerhouse machine vs. meek laptop image among developers, but I regret it now. I've since sold it, and gotten a powerful laptop with external monitors. So much more flexible this way.
I used to have a laptop that I developed on. I was much more comfortable sitting on the couch than at the desk. In fact, the only time I ever preferred being at the desk was if I was working with a book open.
laptop with expose/spaces or equivalent. I'm faster with expose/spaces than dual monitors. You're eyes/focus doesn't move around as much. Though its good exercise for your eyes to focus on things at different depths every now and then.