PDA

View Full Version : Question about programming on a Mac vs. a PC




stoavio
Jun 9, 2006, 07:45 PM
I have a friend who was interested in purchasing a MacBook Pro but has instead decided to purchase a PC because he's under the impression Macs are no good for programming. Is there any truth to this? He has no experience using a Mac and extemely limited knowledge of them but for some reason believes they're not as good as PCs for this purpose. He mentioned something about there being no compilers. I have no programming experience (I'm a front-end and print guy) so I can neither confirm nor debunk his thoughts so I thought I'd ask here.

So, how does a Mac compare to a PC for programming purposes. What exactly is a compiler (I'm assuming it's something that makes your code functional as an application but I could be waaaayy off) and what shortcomings do Macs have that PCs don't, and vice-versa.



Mitthrawnuruodo
Jun 9, 2006, 07:51 PM
Tell him to visit http://developer.apple.com/ :)

stoavio
Jun 9, 2006, 07:56 PM
I should've suggested that but it didn't occured to me. He's already purchased an Alienware.

I'd just like to know how Macs compare to PCs for programming. The pros and cons of each just so I know. :)

I like to advocate the use of Macs whenever possible.

mduser63
Jun 9, 2006, 09:49 PM
FWIW, I was never interested in programming, even though I knew a fair amount about it, until I got a Mac.

OS X includes full developer's tools. They're the same tools that are used to create a great number (soon to be nearly all) Mac OS X applications. You can write in C, C++, Objective-C and Java (nearly) right out of the box. Perl, Python, Ruby, etc are also very well supported by OS X. Cocoa is considered by many to be one of the most developer-friendly systems out there, and it's one of the two primary OS X development frameworks/APIs (the other being Carbon).

As for development on Windows, there probably are more compilers, just as there are more of most kinds of apps on Windows. However, the really good ones cost money. MS Visual Studio is quite expensive, as are Borland's tools. Many of the free IDEs that will run on Windows will run in OS X too (Eclipse, NetBeans, etc).

I'm not sure Windows is really worse for development than OS X, but I'd certainly prefer to write software on a Mac, at least with the admittedly limited experience I have so far.

(Besides, Parallels and Bootcamp make it so there is now no barrier to doing Windows development on a Mac.)

stoavio
Jun 9, 2006, 10:22 PM
Thank you mduser63 for such a complete response. :)

plinden
Jun 9, 2006, 10:29 PM
I've compiled several open source programs on the Mac (using X11 - I don't see what the problem with it is ...) and I've only really just started.

Being unix based, there is a lot of open source code out there that can be compile with minimal changes, and most if not all the Apache code already runs on Mac OS X.

I do all my Java programming on the Mac, only moving to Linux for the final rpm creation. My 17" iMac is faster than my Windows laptop at Java.

mduser63
Jun 9, 2006, 11:41 PM
I've compiled several open source programs on the Mac (using X11 - I don't see what the problem with it is ...) and I've only really just started.

Being unix based, there is a lot of open source code out there that can be compile with minimal changes, and most if not all the Apache code already runs on Mac OS X.

I do all my Java programming on the Mac, only moving to Linux for the final rpm creation. My 17" iMac is faster than my Windows laptop at Java.

That's something I should have mentioned. Because OS X is UNIX-based, it tends to be MUCH easier to run a lot of the free and open-source software out there. To me, from the end-user's perspective, OS X has very nearly all of Linux's benefits with none of the (many) drawbacks.

Mu0n
Jun 10, 2006, 02:45 AM
I "somewhat" have background experience in both.

Well, on the mac side, I've self-taught myself 68k mac C programming using Symantec C++ v6 in recent years.

On the PC side, the assumption that there are many compilers for different tasks is correct.

However, there's a new development in terms of programming in the Visual Studio corner. Microsoft used to sell its Express Editions of Visual Studio for around $50 per language (C++, Basic, C#, J#), but since November 2005, the 2005 versions are completely free. You can get any of those 4 languages I just mentioned. Of course, the SDK that are used in Windows are completely free as well. You have the platform SDK (to make regular Win32 applications), the Directx9 SDK (for 2d & 3d graphics, as well as game input, etc).

The thing is though, the entire Microsoft-propelled programming world is now using the paradigm called .NET 2.0 (another SDK to get. People who want to run your .NET 2.0 apps need to install a .NET 2.0 redistributable package, which is around 50 megs. It's a setback, but the advantages are worth it), which forces you to write what is called "managed code". This takes care of many common programming pitfalls that advanced traditional C++ programmers fall into. You're still free to use unmanaged code, of course, but this new business is intriguing, to say the least.

For example, C# is a totally PC-originating language that forces you to use only objects instanciated from classes. No pointers at all (unless you explicitly demand to write unmanaged code). Everything is declared as a class inside a namespace. Visual Studio is also extremely satisfying in terms of making a standardized GUI (dunno if there is the equivalent in xcode).

Also, .NET 2.0 is almost fully supported on the OSX platform, it's called "mono". I haven't tried it or know anyone who tried it, but it's supposed to be fairly advanced.

I don't know enough about modern mac development to know if there is an equivalent to managed code (not counting mono) on OSX platforms.

stoavio
Jun 10, 2006, 03:46 AM
Thanks guys. Great job answering the question.

It's always nice for us graphic guys to rattle off a few facts about programming every now and then... makes us look good :P

Thanks again.

DavidLeblond
Jun 10, 2006, 08:09 AM
You could always tell him he could program with Java on both platforms. Not sure why anyone would want to, but the option is there. :)

mkrishnan
Jun 10, 2006, 08:47 AM
You could always tell him he could program with Java on both platforms. Not sure why anyone would want to, but the option is there. :)

I guess this is the thing I don't quite understand... there are some sorts of things that you can develop cross-platform (although probably still want test boxes).

But doesn't the decision of what OS to program on depend much more on target market than anything else? I.E. If you want to program for Windows users, you're much better off using Vis Studio on a Windows box than any other option, if you want to program for Linux users, you're going to develop on top of a Linux installation, if you want to program for Mac users, you're going to use OS X + XCode?

I found the whole discussion above of managed environments really interesting... the language I know best is Java, so....

But anyway, I also found this interesting:

http://www.oreillynet.com/onlamp/blog/2005/12/can_apple_do_better_than_objec.html

Although apparently the juiciest part -- the correspondence between the author and Jobs -- is no longer posted.

slooksterPSV
Jun 10, 2006, 11:34 AM
Depending on what he's developing, there's something for everyone. SDL (Simple DirectMedia Layer), Allegro (Game/Graphics API), OpenGL (Open Graphics Library), http://developer.apple.com/games/gameenginesonmac.html <-- link to some other game engines. I mention those API's because those are the only ones I use.
Also there is a program called RealBasic that is very simple to use and uses Visual Basic style of programming. RB can compile for cross-platform.

I do have to say this that in my opinion, XCode is one of the most comprehensive and complete tool systems I have seen any OS release for FREE. I compare it to Visual Studio.

Another side note, see the link in my signature? That's a game I'm developing currently, I just released 0.2b yesterday/last night.

One last thing, your friend said that he thought Macs don't have any compilers? Let him know that you need a compiler to make programs, operating systems, drivers, etc. So any OS that he downloads/buys, Linux, ReactOS, Solaris, Windows, etc. They all have some sort of compiler that you can get and/or use (if already installed) to make programs. You may just have to get APIs, SDKs, etc. for them. For his PC, a good free IDE w/Compiler (MingW and CywinG (sp?)) is Dev-C++. http://www.bloodshed.net/

stunna
Jun 10, 2006, 05:16 PM
I "somewhat" have background experience in both.

Well, on the mac side, I've self-taught myself 68k mac C programming using Symantec C++ v6 in recent years.

On the PC side, the assumption that there are many compilers for different tasks is correct.

However, there's a new development in terms of programming in the Visual Studio corner. Microsoft used to sell its Express Editions of Visual Studio for around $50 per language (C++, Basic, C#, J#), but since November 2005, the 2005 versions are completely free. You can get any of those 4 languages I just mentioned. Of course, the SDK that are used in Windows are completely free as well. You have the platform SDK (to make regular Win32 applications), the Directx9 SDK (for 2d & 3d graphics, as well as game input, etc).

The thing is though, the entire Microsoft-propelled programming world is now using the paradigm called .NET 2.0 (another SDK to get. People who want to run your .NET 2.0 apps need to install a .NET 2.0 redistributable package, which is around 50 megs. It's a setback, but the advantages are worth it), which forces you to write what is called "managed code". This takes care of many common programming pitfalls that advanced traditional C++ programmers fall into. You're still free to use unmanaged code, of course, but this new business is intriguing, to say the least.

For example, C# is a totally PC-originating language that forces you to use only objects instanciated from classes. No pointers at all (unless you explicitly demand to write unmanaged code). Everything is declared as a class inside a namespace. Visual Studio is also extremely satisfying in terms of making a standardized GUI (dunno if there is the equivalent in xcode).

Also, .NET 2.0 is almost fully supported on the OSX platform, it's called "mono". I haven't tried it or know anyone who tried it, but it's supposed to be fairly advanced.

I don't know enough about modern mac development to know if there is an equivalent to managed code (not counting mono) on OSX platforms.

the Visual studio express editions are all free

And for the question
This is how I see it
If you want to make programs for the mac then obvisouly having a mac would be the best route to go and same for the PC
for crossplatform you might want to use java it works well on all systems and some of the most popular IDE's run on all platforms

janey
Jun 11, 2006, 03:20 AM
But doesn't the decision of what OS to program on depend much more on target market than anything else? I.E. If you want to program for Windows users, you're much better off using Vis Studio on a Windows box than any other option, if you want to program for Linux users, you're going to develop on top of a Linux installation, if you want to program for Mac users, you're going to use OS X + XCode?
Well not necessarily.
A target market doesn't need to be split by OS usage. My precalc math class a year ago had some special supplementary math homework that required MSIE 6.0+ on win2k/xp or something retarded along those lines, and the first question to pop up was whether or not it was possible to use Mac/Linux without emulation/virtualization software. Target audience: math classes. Nowhere does it imply that you have to stick with one OS ;)

Also, considering that your friend (well...) wanted to buy an Intel Mac, what's wrong with dualbooting? Visual Studio 2005 runs like a charm on my Macbook, as does Xcode. Needless to say Eclipse and NetBeans and IntelliJ IDEA, etc. all work fine on both OS X and XP as well.

@Mu0n: Mono's still incomparable to what Microsoft has.

dextertangocci
Jun 11, 2006, 07:47 AM
I should've suggested that but it didn't occured to me. He's already purchased an Alienware.

Yuk. I wouldn't be caught dead using a computer with an alien head glued to it!:eek:

mkrishnan
Jun 11, 2006, 07:51 AM
Target audience: math classes. Nowhere does it imply that you have to stick with one OS ;)

Well, when I said there were some things that could be developed cross-platform, that was what I was talking about... web-based apps, Java apps, etc. But when it comes to software that runs on a computer running an operating system, outside of those kinds of situations -- the majority of software still being developed today, isn't it? -- even OSS has an initial target platform. That's just my point... that when people develop native software for platform X, then it's rarer that any development environment on platform Y is going to be better than the stuff developed for X to begin with....

Thom_Edwards
Jun 11, 2006, 10:31 AM
Also, .NET 2.0 is almost fully supported on the OSX platform, it's called "mono". I haven't tried it or know anyone who tried it, but it's supposed to be fairly advanced.

not to nit-pick, but mono only goes up to .net 1.1 (as far as i know). that being said, .net 1.1 is almost fully supported in mono. however, to use the ide you have to run it through gnome on x11.

Marble
Jun 11, 2006, 05:15 PM
not to nit-pick, but mono only goes up to .net 1.1 (as far as i know). that being said, .net 1.1 is almost fully supported in mono. however, to use the ide you have to run it through gnome on x11.

I believe you can also use X-Develop (http://www.omnicore.com/xdevelop.htm) with mono.

gekko513
Jun 12, 2006, 01:36 AM
Java EE and the .NET Framework with C# aren't very different, though. They're both interpreted, managed and are targetting mostly the same market segment.