Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

12991

macrumors member
Original poster
Feb 3, 2007
71
0
Ive never really programmed in my entire life. I just threw something together with xcode in cocoa though. But i was just wondering what is a programming code that works very well with mac and windows?? Will i have to program it twice?? How would i do it? If not, whats the best for mac? And whats the best with pc?? And how do i do html??

What books and stuff do you guys recommend? Thanks
 

andrewface

macrumors 6502
May 17, 2006
284
56
Ive never really programmed in my entire life. I just threw something together with xcode in cocoa though. But i was just wondering what is a programming code that works very well with mac and windows?? Will i have to program it twice?? How would i do it? If not, whats the best for mac? And whats the best with pc?? And how do i do html??

What books and stuff do you guys recommend? Thanks

c works on everything
 

scan

macrumors 6502
Oct 24, 2005
344
0
Ive never really programmed in my entire life. I just threw something together with xcode in cocoa though. But i was just wondering what is a programming code that works very well with mac and windows?? Will i have to program it twice?? How would i do it? If not, whats the best for mac? And whats the best with pc?? And how do i do html??

What books and stuff do you guys recommend? Thanks

I have absolutely no idea what kind of answer you expect people to give you... What do you mean program it twice? What do you mean what programming code works well with mac and windows?

If you dont' mind me asking, how old are you?
 

12991

macrumors member
Original poster
Feb 3, 2007
71
0
Sorry, i was just posting quickly... Im as old as you think i am.

What i want to do is, be able to write programs or make programs that will work 100% on mac and on pc. Is this possible? Well if not, im gonna be getting parallels for my mac... ill likely be getting a book tomorrow for xcode too.
 

12991

macrumors member
Original poster
Feb 3, 2007
71
0
oh and an earlier post used n00b and hes not "14"????
 

bronxbomber92

macrumors regular
Nov 23, 2006
109
0
It all really depends on what API's (Cocoa, wxWidgets, GTK, ect..) you use. Cocoa is primarily for Mac OS X (there is gnustep.org which is and older version of cocoa for linux, and cocotron which is a WIP of cocoa on windows). wxWidgets is a very popular cross-platform GUI API used. If you want code that works natively for all platforms then I would use this. It also can be used with C++ and Python most notably.

If you want to go into games, then this is a whole other story. I would definitely use OpenGL and/or SDL. But I think you want to program applications (?)

Anyways, if you want to make applications for Mac OS X then Cocoa and Objective-C is by far your best choice. :)
 

scan

macrumors 6502
Oct 24, 2005
344
0
Sorry, i was just posting quickly... Im as old as you think i am.

What i want to do is, be able to write programs or make programs that will work 100% on mac and on pc. Is this possible? Well if not, im gonna be getting parallels for my mac... ill likely be getting a book tomorrow for xcode too.


well without much hassle you could learn Java. It'll work on any machine. C is very versitaille too.
 

12991

macrumors member
Original poster
Feb 3, 2007
71
0
thanks alot guys... i think i may spend some time in barnes and nobles tomorrow and figure out what book I should get. And by the way im 16. And im much smarter than i sound over here. I think I'll be writing some apps by the end of the month. Sounds exciting.

But what would be ideal... if you guys could tell me the best, easiest, most compatible on windows and mac, fastest, and most used code is?? C++? Java?? What would you guys recommend? I would like to do basic programs first, then basic games, then more advanced programs and maybe take the games a bit further too. Thanks
 

bronxbomber92

macrumors regular
Nov 23, 2006
109
0
thanks alot guys... i think i may spend some time in barnes and nobles tomorrow and figure out what book I should get. And by the way im 16. And im much smarter than i sound over here. I think I'll be writing some apps by the end of the month. Sounds exciting.

But what would be ideal... if you guys could tell me the best, easiest, most compatible on windows and mac, fastest, and most used code is?? C++? Java?? What would you guys recommend? I would like to do basic programs first, then basic games, then more advanced programs and maybe take the games a bit further too. Thanks

I would say Java is best suited for multiplatform, because most of it's library work for both platforms. C++ is more used then any other language, but is a lot more harder (doesn't have automatic gargabe collection like Java). Java isn't the best language for games though. C++ is probably best for games (SDL and OpenGL). But you could always learn both (probably start with Java).

Edit - BTW, Java is slower becuase its byte code translated by the Java VM. I think Java is just fine for basic games also ;)
 

12991

macrumors member
Original poster
Feb 3, 2007
71
0
Thanks a lot... I think I'm going to experiment with a few. Maybe I'll post back here in a few days and let you know how its going. And in a few weeks, if its worth it, ill post my first program or game, or atleast a link to it. Thanks again
 

Eraserhead

macrumors G4
Nov 3, 2005
10,434
12,250
UK
thanks alot guys... i think i may spend some time in barnes and nobles tomorrow and figure out what book I should get. And by the way im 16. And im much smarter than i sound over here. I think I'll be writing some apps by the end of the month. Sounds exciting.

But what would be ideal... if you guys could tell me the best, easiest, most compatible on windows and mac, fastest, and most used code is?? C++? Java?? What would you guys recommend? I would like to do basic programs first, then basic games, then more advanced programs and maybe take the games a bit further too. Thanks

Java is cross platform, though slower than C, C is only cross platform as a command line tool, Objective C is effectively Mac only, as is Cocoa.
 

lazydog

macrumors 6502a
Sep 3, 2005
709
6
Cramlington, UK
Don't forget RealBasic.

I really like Realbasic, except for the basic part.

RealC++ would be nice. Or RealAda, RealPascal.

Realbasic allows you to target Windows, OS X, Mac OS & Linux.

http://www.realbasic.com/

I'd second that. If you want to write apps 'once' that will run on Mac and PC then RealBasic is pretty good. All you do is hit compile and it produces both versions of your program. It works pretty well too. I build and test on the Mac and in nearly all cases the PC version has always worked as expected. I think the strongest point to RealBasic is its user interface designer and how simple it is to assign code to user events. Also, I would say the code it produces is fast enough for simple games. I seem to recall somewhere on the web a plugin that will let you use OpenGL within RealBasic. There is a trial copy of RealBasic on Realsoftware's web site.

If you're into or want to get into 3D, then another option for cross platform development is GLUT and OpenGL. You'll need to compile twice, once on each platform, but in theory you shouldn't need to rewrite anything so long as you stay within the 'sand-box' that GLUT provides.

b e n
 

mattscott306

macrumors 68040
Jan 16, 2007
3,769
0
Um... going back to the earlier subject of OP's name.. did no one pick up on his userid... 12-9-91?
 

yoavcs

macrumors regular
Apr 7, 2004
220
96
Israel
Slow down a bit

To the OP:

While your enthusiasm for programming shines through, I think it is time to "calm" you down a bit. Programming isn't something you learn after buying a book on Feb 10th, and expect to have "some apps" out by the end of the month.

You are firing in all directions. Slow down a bit. I'd suggest starting out with learning Ruby. A wonderful, well though-out language. You can then learn the Rails framework for creating web apps. This is as close as you'll get to churning out apps in a matter of days to weeks.

Later on you can take your experience and move on to Objective-C and Cocoa for the Mac, or learn C++ for global programming. (Forget Java, it's dead. I've been saying that since 2003. Glad Steve agrees ;)

Anyway, take it nice and slow. You will *not* be writing games by the end of this month. In fact, you won't be writing games (at least not the Doom clone you might want to write) by the end of 2007 either...

Start with Ruby.
 

Eraserhead

macrumors G4
Nov 3, 2005
10,434
12,250
UK
Later on you can take your experience and move on to Objective-C and Cocoa for the Mac, or learn C++ for global programming. (Forget Java, it's dead. I've been saying that since 2003. Glad Steve agrees ;)

Steve only agrees about using it with Cocoa, when before everyone used Obj-C and Obj-C was better. What other alternatives to Java are there for cross platform GUI apps? You can make a Java interface with C or even FORTRAN code to do actual calculations.
 

yoavcs

macrumors regular
Apr 7, 2004
220
96
Israel
I'd say that Java failed miserably in the whole "cross platform GUI app" arena. It might be a theoretically possible, but it never worked out in reality.

More and more it's looking that web-apps will be the closest we get to the holy grail of cross-platform general purpose apps.

On the server side, Java still lives (though I predict it will die there in a few years). On the client side? Screw Java. Go Ruby/Rails, Python/Django, JavaScript, whatever...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.