"With what you suggest, what's the difference between Java code and C code then?"
The structure of Java makes it easier to deal with large projects as compared to C, and it's less of a minefield than C++.
"what's the point in having the GC? getLocation(Point) looks close enough to something like gets(char*) to be unnerving."
Well yeah. It's basically the same thing. Except it doesn't have a buffer overflow vulnerability.
The point is that you can pass things around without worrying so much about who has one (though of course you still do have to worry for thread safety). In C/C++, you have to take very special care if you want to pass anything that's been allocated around, make sure it has a refcount, etc.
Also, you don't need to do it all the time, just catch the cases that happen a lot. It's usually not that hard to provide two altneratives of a function, where one allocates the object and the other takes it as an argument. It's an optimization, it's optional, and it's damned easy to use. Another example is the use of StringBuffers instead of Strings when you need to concatinate them. Strings are immutable, so it has to do a copy every time you cat two strings, and the old copy is lost.
We'd all like to believe garbage collection were free, but it's not. If we can take a bit of the work away, it's a lot less expensive. We can still use it though.
I actually prefer Python and C to Java, but Java does have its uses.
Just because everything is on the heap doesn't mean you can't reduce allocations.
Littering memory with temporary objects makes a lot of work for the garbage collector. If that can be reduced, there are significant performance advantages. For example, javax.swing.JComponent.getLocation() takes a Point object as an argument, so it can setup the provided object rather than allocating a new one.
If you can set up your classes to recycle objects like that, you can reduce the allocations and therefore reduce the work for the garbage collector. You can get very close to C++ performance if you put a little time and care into it, and it's still way easier than dealing with C++ because you don't have to achieve perfection with your memory management. You just have to recycle the most commonly used objects.
""Processors are cheap." and "Disk space is cheap." are horrendous excuses for bad programming. If you have used these expressions to justify your application, you are a bad programmer!"
Okay, I'm going to refute this is two stages because you're wrong in two ways.
First, it's not a matter of "processors are cheap". It's "processors are cheap compared to programmers, sometimes". If they're paying for months of your time, most of the time it's way cheaper for them to get a faster computer than have you write the thing in a language that will take longer. That is of course dependant on the number of computers it will run on and the performance requirements of the project.
Second, Java and Python are not necessarily slow. In the case of Java, it's usually a matter of keeping heap allocations to a minimum. In the case of Python, it's usually a matter of spending as much time as possible in a C library (even if that means you have to write the C library).
Doing that will usually get you within a factor of two of the performance of C.
"If you want a 64-bit server farm, for example, Xserve is quite competitive vs. Opteron or Itanium."
Funny, you'd think I didn't even say "middle end" in my post.
"Similarly, most server farms in enterprises are name brand (IBM, HP or Dell), they're not exactly "next to nothing" in cost..."
Dell has a number of machines on their site for under a thousnad dollars. You could get 3-4 of them for every XServe. For some uses, that's significantly faster, and sometimes you only need one and an XServe is massive overkill for a lot of extra money.
Servers like that aren't necessarily good for everything, but they do constitute the majority of server sales and Apple doesn't make something competitive in that market.
They don't want to compete at the low end, they've said that repeatedly, and that's fine, but it also means that sooner or later you have to look to another vendor that is willing to sell you the machine you want.
Such machines would not be usable as desktops or workstations, IMO, even if they run well enough to do some diagnostic stuff and play MP3s.
"They run WindowsXP (even with Themes turned on), and benchmark almost 20% faster in applications than they do if we swap hard drives and run Win98 on the poor suckers."
Hardly surprising as they have the benefit of the NT kernel for I/O and VM.
<rant>Yes, it rocks that much that we are looking for stable alternatives. Especially the 2.6 kernel has been *ahem* interesting. If the kernel hackers got their act together and released a really stable version of the 2.6 kernel we might want to use it. But they don't so we don't.</rant>"
New releases of OS X generally run faster than older ones because the OS is relatively new and optimizations are keeping pace with feature adds.
The one thing you'll want is a decent amount of memory. 128 mb hasn't been enough for any previous version, and it's doubtful it'll be enough for 10.4.
"Aside from being very easy to keep up to date, Gentoo's documentation, organization, configuration file management, dependency/build management, package handlings, init scripts, and so forth are so much better than anything else out there right now, I don't know why anyone would want to use anything else."
I loved all those things about Gentoo, however I eventually abandoned it due to its unmatched ability to break itself without my help.
I tried it twice, each time for about 3 months. I had breakage on most of my updates. Nobody's perfect, but there were problems like a KDE update requiring a masked version of famd. Since that would have been caught if anyone had tried it on a "stable" system (as building it is sufficient to reveal the problem), I can only conclude they didn't do any regression testing at all. That's just not good enough.
I almost always found the solution on the forums, however cruising the forums looking for patches is an enormous pain in the butt and they can take days to appear. I'd rather use a distro that's a bit out of date and then manually install the two things I actually want the latest version of.
Debian is too stable and it's really irritating how out of date it is, but Gentoo is too unstable to be useful on production machines. Being up to date is only a benefit when the damn thing works.
Well consider how the media has changed since floppies were standard.
There was never any (popular) successor to the floppy that was backwards compatible, apart from incremental updates (eg 360k -> 720k -> 1440k), and things like the Jaz drive were always proprietary and never very popular.
In contrast, the CD and its successors are backwards compatible. You may assume a DVD drive, and whatever comes after that (Blu-Ray) and whatever comes after that (UV-Ray?) will be able to read your CDs for many years to come. So the lifetime of such media is an issue.
Live filesystems are a practical solution for a different reason. For many people (though not necessarily all people or all businesses), hard drives have kept pace with the need for storage, and it is practical to simply dump the contents of the old drive onto the new one and leave it there in addition to the new stuff. My "old computer backup" folder contains the "old computer backup" folder from the previous computer, probably nested 4-5 deep.
That way, the lifetime of the backup media doesn't matter because if you lose the drive, you only need the latest full backup and any subsequent incrementals, which rarely covers more than a few years.
I agree Linux on the desktop has come a long way, but it's pretty spikey sometimes. If an application (or a specific version of an application) isn't in your distro's package manager, it can be frustrating getting it compiled and working. And the distros like Gentoo that get new versions quickly have reliability problems. Also, I have yet to see a distro that can see me through anything serious without dumping me at the command line. I don't care; I'm comfortable there, but it's not for non-technical users.
With MacOS, you just drag the.app to/Applications and run it. It just works. Not even Windows can give you that.
That's not to say I could give up Linux. I need it and there's no way I could replace it with MacOS for a variety of reasons. The biggest is that it's not source compatible with Linux, but it also costs a lot of extra money to get a PowerMac when all I need is gigabit ethernet and dual monitors.
My needs are pretty unusual though, and people comfortable enough with Linux to rely on it are rare. And even when they are comfortable with it, they frequently just don't feel like dealing with it.
At the low end (server farms mostly), nothing can compete with commodity machines running Linux/FreeBSD. They cost next to nothing and it isn't worth more money to get a better machine when you can get twice as many of the commodity ones for the same amount.
At the high end, you need lots (>4) of processors, hot-swappable and redundant parts, and a number of other things that Apple hardware and software can't do.
The result? XServes aren't generally used for commodity things like big server farms, and can't be used for large scale enterprise stuff due to lack of scalability and availability features. They get used for middle-end stuff for small to moderate sized networks. Fileservers, database servers, multipurpose servers, that sort of thing.
They do pretty damn well in their niche, but they'll need to release more models with better features if they want to expand. I doubt they'll go to the high end, because everyone in that area except IBM is in trouble and they'd have to make large changes to MacOS X Server. More likely is a partnership with IBM if that's where they want to go. I doubt they'll go into the low end, because the margins there suck and they can't displace Linux/FreeBSD any more than any of the other proprietary systems can.
"Hopefully you don't anymore -- hell, I used to myself. If you do, take a look at Fitts' Law, from which can be concluded that such a design is actually best for users."
What baffles me is why Apple has yet to release a mouse with a scroll wheel or equivilant. I've heard the rumors that they might, but with Apple everything is a rumor until Steve says "And one more thing...".
Scroll bars are tiny targets in HCI terms, and scrolling is one of the most common operations. The keyboard is the only real alternative, and it's not always a good one.
It's slightly more complicated for users, but I would argue not much more. I've watched people using a scroll wheel for the first time (optical wheel mice make good birthday/xmas presents because people don't realize how much they'll like them), and I haven't seen any of them go more than a few minutes without starting to use it reflexively. And these are people that don't have their own optical wheel mouse yet, which means they're almost exclusively not computer savvy.
"Which means it's quite easier to hit the menus in an Apple environment than it is in a menu-under-the-application-title-bar environment such as MS Windows (as well as KDE and Gnome)."
Applications are "maximized" a lot more in those other systems. But then, the menu bar is probably one of the biggest reasons why they do that.
This is the strongest argument in favor of an Apple computer. Unless you're absoloutely married some Windows application unsuited to VPC (like games), chances are you're going to spend less time on maintenance and dealing with irritations like malware and malware prevention on a Mac.
minis are not great computers. G4s have a slower bus than Athlons did in 1999, the default config doesn't have enough memory, and the video card isn't new enough to use Core Image when 10.4 is released. The equivilant Windows machine will be more powerful, and if properly maintained it will perform better. But that maintenance is the problem.
It's a fair bet that most Windows Slashdot users can maintain their machines, but most of the other people out there are waiting for their brother in law to come round so the machine can be fixed, and they can check their e-mail. By avoiding issues like that, the Mac is effectively faster because it has greater availability.
Linux is preferable for some people because it performs better, and customizable hardware (Linux users are vastly more likely to want customizable hardware) is much cheaper. But that will always be a niche market. Even amoung users capable of maintaining a Linux box, a significant number just don't feel like it.
Now that MacOS has matured (10.2 was not mature), I am not surprised to see it becoming more mainstream. The final element is for faster processors to make their way into the value lines, and that is only a matter of time.
I'm one of the few that likes to use Linux, but I am happy to see Apple succeeding.
I find a good method is to make a truly random password and then practice it for 5 minutes once or twice a day for a few days. Then it's reflex. Repeat every few months.
I like KDE because it's fairly customizable. I'm not saying it's more customizable than Gnome, just that it meets my needs. I tried Gnome when I was initially deciding which one to use, but getting things working seemed quite counter-intuitive for me so I gave up. Again, I'm not saying it's counter-intuitive, just counter-intuitive for me when compared to KDE.
I don't care about the bloat on either, to be honest. I could use a lighter system but KDE gets me 99% of what I want with zero effort. And its memory usage is nothing compared to some of the stuff I do. I spent the money for a gig of memory so I could do what I wanted without swapping, I might as well enjoy it.
I spend most of my time at the command line so I mostly just want a GUI that can do stuff like use Firefox and play movies and so forth without me having to put time into it.
My BSD box has a lot less memory and it's running a LOT of services so I'd consider something lighter weight if I wanted a GUI there, but I don't bother because my Linux and BSD machines sit right next to each other connected by a gigabit network. SSHing from one to the other is trivial, SSH has X tunneling so if I want stuff like emacs it's easy, and my Linux machine has dual LCD monitors so it's much nicer to work on even if everything is an SSH session to another machine.
In summary: it's unwillingness to put effort into the lighter weight alternatives when the results are satisfactory right now and the bloat doesn't hurt me. I simply don't care as long as the results are "good enough".
No denying that.
I'm not saying Java is perfect, but the performance is generally good enough for something else to decide which language to use.
"With what you suggest, what's the difference between Java code and C code then?"
The structure of Java makes it easier to deal with large projects as compared to C, and it's less of a minefield than C++.
"what's the point in having the GC? getLocation(Point) looks close enough to something like gets(char*) to be unnerving."
Well yeah. It's basically the same thing. Except it doesn't have a buffer overflow vulnerability.
The point is that you can pass things around without worrying so much about who has one (though of course you still do have to worry for thread safety). In C/C++, you have to take very special care if you want to pass anything that's been allocated around, make sure it has a refcount, etc.
Also, you don't need to do it all the time, just catch the cases that happen a lot. It's usually not that hard to provide two altneratives of a function, where one allocates the object and the other takes it as an argument. It's an optimization, it's optional, and it's damned easy to use. Another example is the use of StringBuffers instead of Strings when you need to concatinate them. Strings are immutable, so it has to do a copy every time you cat two strings, and the old copy is lost.
We'd all like to believe garbage collection were free, but it's not. If we can take a bit of the work away, it's a lot less expensive. We can still use it though.
I actually prefer Python and C to Java, but Java does have its uses.
Just because everything is on the heap doesn't mean you can't reduce allocations.
Littering memory with temporary objects makes a lot of work for the garbage collector. If that can be reduced, there are significant performance advantages. For example, javax.swing.JComponent.getLocation() takes a Point object as an argument, so it can setup the provided object rather than allocating a new one.
If you can set up your classes to recycle objects like that, you can reduce the allocations and therefore reduce the work for the garbage collector. You can get very close to C++ performance if you put a little time and care into it, and it's still way easier than dealing with C++ because you don't have to achieve perfection with your memory management. You just have to recycle the most commonly used objects.
""Processors are cheap." and "Disk space is cheap." are horrendous excuses for bad programming. If you have used these expressions to justify your application, you are a bad programmer!"
Okay, I'm going to refute this is two stages because you're wrong in two ways.
First, it's not a matter of "processors are cheap". It's "processors are cheap compared to programmers, sometimes". If they're paying for months of your time, most of the time it's way cheaper for them to get a faster computer than have you write the thing in a language that will take longer. That is of course dependant on the number of computers it will run on and the performance requirements of the project.
Second, Java and Python are not necessarily slow. In the case of Java, it's usually a matter of keeping heap allocations to a minimum. In the case of Python, it's usually a matter of spending as much time as possible in a C library (even if that means you have to write the C library).
Doing that will usually get you within a factor of two of the performance of C.
Jobs has more to do with Apple's comeback than the OS.
"If you want a 64-bit server farm, for example, Xserve is quite competitive vs. Opteron or Itanium."
Funny, you'd think I didn't even say "middle end" in my post.
"Similarly, most server farms in enterprises are name brand (IBM, HP or Dell), they're not exactly "next to nothing" in cost..."
Dell has a number of machines on their site for under a thousnad dollars. You could get 3-4 of them for every XServe. For some uses, that's significantly faster, and sometimes you only need one and an XServe is massive overkill for a lot of extra money.
Servers like that aren't necessarily good for everything, but they do constitute the majority of server sales and Apple doesn't make something competitive in that market.
They don't want to compete at the low end, they've said that repeatedly, and that's fine, but it also means that sooner or later you have to look to another vendor that is willing to sell you the machine you want.
Such machines would not be usable as desktops or workstations, IMO, even if they run well enough to do some diagnostic stuff and play MP3s.
"They run WindowsXP (even with Themes turned on), and benchmark almost 20% faster in applications than they do if we swap hard drives and run Win98 on the poor suckers."
Hardly surprising as they have the benefit of the NT kernel for I/O and VM.
From the FAQ:
"Infidels! Linux rocks!
<rant>Yes, it rocks that much that we are looking for stable alternatives. Especially the 2.6 kernel has been *ahem* interesting. If the kernel hackers got their act together and released a really stable version of the 2.6 kernel we might want to use it. But they don't so we don't.</rant>"
If only this were a joke...
Kinda bitter for an April fool's joke. Not that I blame them.
"can you say that you can use a 6-year old PC without any siginificant upgrades and still run the latest OS and software and be productive with it?
Sure. As long as you're not married to Windows.
New releases of OS X generally run faster than older ones because the OS is relatively new and optimizations are keeping pace with feature adds.
The one thing you'll want is a decent amount of memory. 128 mb hasn't been enough for any previous version, and it's doubtful it'll be enough for 10.4.
There's one or two things that prevent me from using FreeBSD unfortunately, otherwise I already would be.
"Aside from being very easy to keep up to date, Gentoo's documentation, organization, configuration file management, dependency/build management, package handlings, init scripts, and so forth are so much better than anything else out there right now, I don't know why anyone would want to use anything else."
I loved all those things about Gentoo, however I eventually abandoned it due to its unmatched ability to break itself without my help.
I tried it twice, each time for about 3 months. I had breakage on most of my updates. Nobody's perfect, but there were problems like a KDE update requiring a masked version of famd. Since that would have been caught if anyone had tried it on a "stable" system (as building it is sufficient to reveal the problem), I can only conclude they didn't do any regression testing at all. That's just not good enough.
I almost always found the solution on the forums, however cruising the forums looking for patches is an enormous pain in the butt and they can take days to appear. I'd rather use a distro that's a bit out of date and then manually install the two things I actually want the latest version of.
Debian is too stable and it's really irritating how out of date it is, but Gentoo is too unstable to be useful on production machines. Being up to date is only a benefit when the damn thing works.
Well consider how the media has changed since floppies were standard.
There was never any (popular) successor to the floppy that was backwards compatible, apart from incremental updates (eg 360k -> 720k -> 1440k), and things like the Jaz drive were always proprietary and never very popular.
In contrast, the CD and its successors are backwards compatible. You may assume a DVD drive, and whatever comes after that (Blu-Ray) and whatever comes after that (UV-Ray?) will be able to read your CDs for many years to come. So the lifetime of such media is an issue.
Live filesystems are a practical solution for a different reason. For many people (though not necessarily all people or all businesses), hard drives have kept pace with the need for storage, and it is practical to simply dump the contents of the old drive onto the new one and leave it there in addition to the new stuff. My "old computer backup" folder contains the "old computer backup" folder from the previous computer, probably nested 4-5 deep.
That way, the lifetime of the backup media doesn't matter because if you lose the drive, you only need the latest full backup and any subsequent incrementals, which rarely covers more than a few years.
I agree Linux on the desktop has come a long way, but it's pretty spikey sometimes. If an application (or a specific version of an application) isn't in your distro's package manager, it can be frustrating getting it compiled and working. And the distros like Gentoo that get new versions quickly have reliability problems. Also, I have yet to see a distro that can see me through anything serious without dumping me at the command line. I don't care; I'm comfortable there, but it's not for non-technical users.
.app to /Applications and run it. It just works. Not even Windows can give you that.
With MacOS, you just drag the
That's not to say I could give up Linux. I need it and there's no way I could replace it with MacOS for a variety of reasons. The biggest is that it's not source compatible with Linux, but it also costs a lot of extra money to get a PowerMac when all I need is gigabit ethernet and dual monitors.
My needs are pretty unusual though, and people comfortable enough with Linux to rely on it are rare. And even when they are comfortable with it, they frequently just don't feel like dealing with it.
At the low end (server farms mostly), nothing can compete with commodity machines running Linux/FreeBSD. They cost next to nothing and it isn't worth more money to get a better machine when you can get twice as many of the commodity ones for the same amount.
At the high end, you need lots (>4) of processors, hot-swappable and redundant parts, and a number of other things that Apple hardware and software can't do.
The result? XServes aren't generally used for commodity things like big server farms, and can't be used for large scale enterprise stuff due to lack of scalability and availability features. They get used for middle-end stuff for small to moderate sized networks. Fileservers, database servers, multipurpose servers, that sort of thing.
They do pretty damn well in their niche, but they'll need to release more models with better features if they want to expand. I doubt they'll go to the high end, because everyone in that area except IBM is in trouble and they'd have to make large changes to MacOS X Server. More likely is a partnership with IBM if that's where they want to go. I doubt they'll go into the low end, because the margins there suck and they can't displace Linux/FreeBSD any more than any of the other proprietary systems can.
"Hopefully you don't anymore -- hell, I used to myself. If you do, take a look at Fitts' Law, from which can be concluded that such a design is actually best for users."
What baffles me is why Apple has yet to release a mouse with a scroll wheel or equivilant. I've heard the rumors that they might, but with Apple everything is a rumor until Steve says "And one more thing...".
Scroll bars are tiny targets in HCI terms, and scrolling is one of the most common operations. The keyboard is the only real alternative, and it's not always a good one.
It's slightly more complicated for users, but I would argue not much more. I've watched people using a scroll wheel for the first time (optical wheel mice make good birthday/xmas presents because people don't realize how much they'll like them), and I haven't seen any of them go more than a few minutes without starting to use it reflexively. And these are people that don't have their own optical wheel mouse yet, which means they're almost exclusively not computer savvy.
"Which means it's quite easier to hit the menus in an Apple environment than it is in a menu-under-the-application-title-bar environment such as MS Windows (as well as KDE and Gnome)."
Applications are "maximized" a lot more in those other systems. But then, the menu bar is probably one of the biggest reasons why they do that.
"What amazes me most is how short of a time it took for OS X to get put together."
It helped that NeXT spend a decade on it before Apple bought them.
This is the strongest argument in favor of an Apple computer. Unless you're absoloutely married some Windows application unsuited to VPC (like games), chances are you're going to spend less time on maintenance and dealing with irritations like malware and malware prevention on a Mac.
minis are not great computers. G4s have a slower bus than Athlons did in 1999, the default config doesn't have enough memory, and the video card isn't new enough to use Core Image when 10.4 is released. The equivilant Windows machine will be more powerful, and if properly maintained it will perform better. But that maintenance is the problem.
It's a fair bet that most Windows Slashdot users can maintain their machines, but most of the other people out there are waiting for their brother in law to come round so the machine can be fixed, and they can check their e-mail. By avoiding issues like that, the Mac is effectively faster because it has greater availability.
Linux is preferable for some people because it performs better, and customizable hardware (Linux users are vastly more likely to want customizable hardware) is much cheaper. But that will always be a niche market. Even amoung users capable of maintaining a Linux box, a significant number just don't feel like it.
Now that MacOS has matured (10.2 was not mature), I am not surprised to see it becoming more mainstream. The final element is for faster processors to make their way into the value lines, and that is only a matter of time.
I'm one of the few that likes to use Linux, but I am happy to see Apple succeeding.
I find a good method is to make a truly random password and then practice it for 5 minutes once or twice a day for a few days. Then it's reflex. Repeat every few months.
If I caught the reference, it's not obscure enough. And I did.
Man that game rocks.
I am going to install some software I've never heard of on my system just to get a video why?
What's wrong with bittorrent?
"I guess it depends on your priorities."
Exactly. That's exactly it. My priorities are incompatible with Gentoo, yours are very much compatible.
"Other distros have far worse problems IMO."
Well, that depends on your priorities.
I like KDE because it's fairly customizable. I'm not saying it's more customizable than Gnome, just that it meets my needs. I tried Gnome when I was initially deciding which one to use, but getting things working seemed quite counter-intuitive for me so I gave up. Again, I'm not saying it's counter-intuitive, just counter-intuitive for me when compared to KDE.
I don't care about the bloat on either, to be honest. I could use a lighter system but KDE gets me 99% of what I want with zero effort. And its memory usage is nothing compared to some of the stuff I do. I spent the money for a gig of memory so I could do what I wanted without swapping, I might as well enjoy it.
I spend most of my time at the command line so I mostly just want a GUI that can do stuff like use Firefox and play movies and so forth without me having to put time into it.
My BSD box has a lot less memory and it's running a LOT of services so I'd consider something lighter weight if I wanted a GUI there, but I don't bother because my Linux and BSD machines sit right next to each other connected by a gigabit network. SSHing from one to the other is trivial, SSH has X tunneling so if I want stuff like emacs it's easy, and my Linux machine has dual LCD monitors so it's much nicer to work on even if everything is an SSH session to another machine.
In summary: it's unwillingness to put effort into the lighter weight alternatives when the results are satisfactory right now and the bloat doesn't hurt me. I simply don't care as long as the results are "good enough".