The best starting language for mac...?

Moderator
Posts: 3,570
Joined: 2003.06
Post: #16
akb825 Wrote:Oh, and we had to integrate FBX support in our tool at work. I've heard some horror stories from the guy it integrated it: memory leaks everywhere, features that don't work, lack of instancing etc.

Heh... and don't forget the worthless documentation and buggy demos! Seriously, the guys that wrote it didn't know how to use it themselves. It is clear as day that there are multiple programming styles that worked on that SDK. yuck yuck YUCK! I managed to at least get *some* functionality going before I got distracted by something shiny.

Again, this isn't necessarily a byproduct of C++, but maybe just poor development/project management, although C++ being what it is certainly gave them the tools to screw things up in creative ways.

This reminds me of another yucky C++ API: Maya API. Admittedly, it's supporting a rather large and complex piece of software, but it's a winding twisting path to dig into in places.
Quote this message in a reply
Member
Posts: 260
Joined: 2005.05
Post: #17
Carlos Camacho Wrote:Ingemar,
No mention of Pascal? I'm saddened!
I did between the lines, but I don't want to repeat myself all the time.

But yes, now that you mentioned it, Pascal, or rather FPC (so we are talking up-to-date stuff), should be an obvious option. Similar enough to C and C++ for future job offers but much easier to get started with, modern features, fewer pitfalls, cross-platform. That's sales pitch enough for this thread. Smile

I have been coding Cocoa in FPC quite a bit, and it is actually quite nice, much cleaner than ObjC! And there is an iPhone version too.
Quote this message in a reply
Member
Posts: 194
Joined: 2009.02
Post: #18
This is a little off topic but Ingemar, were you a co-author of "Tricks of the Mac Game Programming Gurus" ?
Quote this message in a reply
Founder
Posts: 1,138
Joined: 2002.04
Post: #19
Quote:This is a little off topic but Ingemar, were you a co-author of "Tricks of the Mac Game Programming Gurus" ?
Yes, he's that guru.
Smile

Carlos A. Camacho,
Founder
iDevGames
Quote this message in a reply
Nibbie
Posts: 4
Joined: 2010.02
Post: #20
Wow, frankly I am surprised, and a little giddy that I got so many excellent replies.
The hardest thing for a beginner like me is to figure out where to start (you have to understand that a lot of this talk is just random letters thrown around to one like myself). But after a good deal of research, and this post of course, I think i've got at least a tentative 'plan'. What I gather is that i'm best putting my C++ book to the side and start with C (where finding a good book will be a challenge in itself). Then try to explore Objective-C, Cocoa, and openGL, which im oblivious to so far but will do some research.

And to clarify, iPhone programming is a long term goal. I look at it as a finish line. I'm actually quite amused with the smallest things. My first program was declaring an int value and adding 10 to it, and I was so pleasedRasp

Well, any good book recommendations? Good programs/compilers? im currently using code::blocks as it has a make version and can't quite figure out Xcode.

Anyway thanks a lot for the invaluable help (and good links to i'm gonna spend some time checking them out)

-Cheers
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #21
BumPer Wrote:I'm actually quite amused with the smallest things. My first program was declaring an int value and adding 10 to it, and I was so pleasedRasp
I would say that's actually a good thing. That means that you are excited about programming itself, and you will be much more likely to stick with it. A lot of people come here and want to start off right away with an MMORPG, and don't even see the road between where they start (with no prior experience) and their lofty goal in the clouds.

As for programs, XCode will be what you'll need in the end. If code::blocks is working for you, you can go ahead and use that to begin with until you understand the overall system better. When you advance and move towards using Objective C, many Cocoa books cover basic usage of XCode as well. There are also many resources online on how to use XCode.
Quote this message in a reply
Moderator
Posts: 3,570
Joined: 2003.06
Post: #22
Since you're starting from point zero and you don't have to have iPhone right away, you might consider starting with something even easier like processing or python/pygame or some modern dialect of BASIC for the Mac.

Again, don't forget to check out unity3D.

If you're determined to learn the good stuff though, for C, two books I recommend are:

Learn C on the Mac

The C Programming Language <-- quite overpriced but it's THE C reference manual.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #23
Really, make is where you need to end up. Xcode is an annoyance on the way there (and unfortunately, apparently compulsory to test your iPhone app on your phone -- but you can use make for everything else).
Quote this message in a reply
Moderator
Posts: 3,570
Joined: 2003.06
Post: #24
OneSadCookie Wrote:Really, make is where you need to end up. ...

I've been saying I'm going to give make a real spin one of these days, but I *still* use Xcode. Pity me!
Quote this message in a reply
Nibbie
Posts: 4
Joined: 2010.02
Post: #25
Funny you mention that AnotherJake, I went out to the bookstore today and "The C Programming Language" book you referenced is the only C book that had in stock. So I bought it...
Quote this message in a reply
Nibbie
Posts: 4
Joined: 2010.02
Post: #26
follow up question,

I was trying to run the simple printf("hello world/n'); in xcode and I hit build and run, it says build successful but nothing happens. No terminal window that says hello world. I installed the Xcode package, anyone know why this might be?
Quote this message in a reply
Moderator
Posts: 3,570
Joined: 2003.06
Post: #27
The output will be viewable in the Xcode debugger console or window or whatever it's called. If you look in Xcode Preferences, under the General category, there should be a pop-up for Layout. If you have it set to All-In-One, then when you run the program, the pane at the bottom of your Xcode window should have the output after you build and run. It should say something like this:
Code:
[Session started at 2010-02-17 15:44:06 -0700.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1461) (Wed Dec 23 06:11:18 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".tty /dev/ttys004
Loading program into debugger…
Program loaded.
run
[Switching to process 79682]
Running…
Hello, World!

Debugger stopped.
Program exited with status value:0.

BTW, you got your slash backwards in your printf and the closing quote needs to be a double quote. Also, your main.c file should look like this if you use the standard Xcode template for a command line tool written in C:
Code:
#include <stdio.h>

int main (int argc, const char * argv[]) {
    // insert code here...
    printf("Hello, World!\n");
    return 0;
}

"The C Programming Language" book isn't always very easy to learn from for beginners, but it's an essential reference so it's great that you got it. Some prefer the easier approach in the other book, "Learn C on the Mac", which should also explain how to use Xcode, I think (I haven't seen anything since the second edition of the book back in the mid 90's so I don't know what's in the new one).
Quote this message in a reply
Nibbie
Posts: 1
Joined: 2010.10
Post: #28
In picking a computer language, I think you need to assess your long term goals in learning it.

A lot of people who take a run at learning how to program have no intention of becoming professional programmers. To them I say, pick whatever has the feature set you are looking for that match your particular interest. It is for this reason that HyperCard was once so popular on the Mac.

If you want to become a professional programmer, then Id go with C/C++, and also take at least a beginning class on it. Java is popular in schools, yes, but C++ is highly desired for desktop applications, and available on all platforms. It isn't going away on the Mac. I suggest a class because some concepts are going to be easier to learn if you have someone there to help answer questions.
Quote this message in a reply
Member
Posts: 260
Joined: 2005.05
Post: #29
(Feb 16, 2010 11:12 AM)NelsonMandella Wrote:  This is a little off topic but Ingemar, were you a co-author of "Tricks of the Mac Game Programming Gurus" ?
Oops, missed that question (although Carlos filled me in). Yes, I was, actually lead author, whote half of the book, more than anyone else. Much of the book is aged now, but I am still pretty proud of the game AI parts (100+ pages on game AI, that's a lot for its time). I actually reused a little of that in my newer books.

Today I teach computer graphics and game programming, I have written two more books on these subjects, and even been looking into making a Mac/iPhone adaption of my recent work. But for that part of my work, this thread is extremely important. The lack of a good starting language that combines ease of debugging with speed is saddening. I think FPC is pretty much right (consider it a kind of C++ with safety belts) but I have to find some support from the University. But now that Java seems to be dying, maybe it is time to reconsider? 20 year old, dated arguments should be questioned some time.
Quote this message in a reply
Member
Posts: 26
Joined: 2010.01
Post: #30
Ingemar - thank you for the writing in Tricks. It was one of the first good programming books I read before entering the games industry, and its mix of pragmatism, architecture and the occasional hack was a great early primer for me, and led to a 12-year career in triple-A games dev, much of it as a lead programmer.

As to whether FPC is a good way to go as a teaching language, it's hard to say. C/C++ are very entrenched, C# has the weight of Windows behind it, and any starting language would want to take account of that. Also it depends whether you're teaching CS or something more pragmatic, things like ML have not totally lost their relevance Wink In the end there is a trade-off between the benefits of broad knowledge and the immediate applicability of what you've learnt.

I wonder, has anyone explored Google's Go as an early programming language? That would incorporate modern ideas about threading, although it may well be a circular argument which leads back to C, since before you get that far you'd need the basic C concepts.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Hello, starting first project, looking for advice in language and tools aqua_scummm 15 7,368 Jan 31, 2008 06:39 AM
Last Post: ynda20