Newbie wanting to learn about Programming Concepts on a Mac

Joined
Sep 23, 2009
Messages
33
Reaction score
0
Points
6
Location
North Canton, Ohio
Your Mac's Specs
Snow Leopard 10.6 iMac 2.93 GHz Intel Core 2 Duo, Memory: 4 GB, Hitachi HDT721 640GB
I am running Snow Leopard 10.6

I am brand new to compiling code on a mac, what tools would I need to compile and make things work on my computer. Would I use Apple Developer Tools? My first mission is to install GhostScript to work with Scribus.

I do have knowledge, although very limited, to programming in C++ (using visual studio) and Java (using the Java Developer Kit, and JRE). I am no stranger to the *nix operating environments running line commands in the Terminal. I have taken college level classes on these as well as the programming languages listed above. However, programming is not my strong point but I would be more than willing to learn and experiment with it. I am a newbie on these topics when using a mac.

Also, are there any precautions that need to be taken with compiling? What about scripting? I just bought this iMac last year. I know misplaced/missing files and such can be disastrous to a system.

Shamefully, I am strictly a GUI user for now. Compiling and running applications from a line command have always intimidated me, but I would love to learn how to use them.

If someone could direct me to a tutorial or something on these topics that would be great. There's alot of information out there, I have Googled the subject before I posted this, but I want the most effective tools and answers.
 
Joined
Jun 2, 2008
Messages
707
Reaction score
13
Points
18
What language do you want to focus on? You can program in JAVA on the Mac or you could install XCode (on your install disks) and start to learn Cocoa which is basically an objective C language. So the question still remains, what language do you want to program in?
 
OP
C
Joined
Sep 23, 2009
Messages
33
Reaction score
0
Points
6
Location
North Canton, Ohio
Your Mac's Specs
Snow Leopard 10.6 iMac 2.93 GHz Intel Core 2 Duo, Memory: 4 GB, Hitachi HDT721 640GB
What language do you want to focus on? You can program in JAVA on the Mac or you could install XCode (on your install disks) and start to learn Cocoa which is basically an objective C language. So the question still remains, what language do you want to program in?

I probably could dust off my old(er) Java and C++ books and start there.
 
Joined
Jun 25, 2005
Messages
3,231
Reaction score
112
Points
63
Location
On the road
Your Mac's Specs
2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
Perusing the Scibus site I saw that there was a link for a PKG installer for Ghostscript, so why not just use that? OK, you may not trust the source distributing it.

To install items from source, you'll need to install XCode. That came on your install DVD.

Often these source projects have easy instructions for compiling and installing. The problem comes when there are dependencies. In some cases those seem to go on forever. That is why people have created tools like MacPorts.

Precautions may vary on your trust level. I'd backup my personal files and anything else that might be difficult to recreate. The few times I've used open source material, I've only downloaded from trusted sources. Either from the project site or sites they point to. Read the install documentation twice and note any exceptions or requirements.

As DaFlake mentioned, you need to define your focus of interest. If you want to write command line scripts then a scripting tool such as csh, bash, Perl, Python, PHP, etc all work well. I believe Python even has the ability to develop OS X GUI apps. Of course if your aim is to develop full OS X desktop apps limited to running on OS X, then learn Cocoa, the frameworks and tools Apple supplies for free. For cross platform development things get a little tricky, but common ones are Java and RealBasic. There are many development tools available for the Mac and understanding your interests will help narrow down your available choices.

It sounds to me that for now you are interested in how shells work to understand install scripts. The default on the Mac is Bash. I don't know how ofter bash is used in things like install scripts, so perhaps it would be better to learn csh (considered harmful), tcsh, or bourne.
 
Joined
Jun 2, 2008
Messages
707
Reaction score
13
Points
18
Well said xstep! :)

I'm currently tinkering with PHP. Not a bad little language.
 
OP
C
Joined
Sep 23, 2009
Messages
33
Reaction score
0
Points
6
Location
North Canton, Ohio
Your Mac's Specs
Snow Leopard 10.6 iMac 2.93 GHz Intel Core 2 Duo, Memory: 4 GB, Hitachi HDT721 640GB
Perusing the Scibus site I saw that there was a link for a PKG installer for Ghostscript, so why not just use that? OK, you may not trust the source distributing it.

To install items from source, you'll need to install XCode. That came on your install DVD.

Often these source projects have easy instructions for compiling and installing. The problem comes when there are dependencies. In some cases those seem to go on forever. That is why people have created tools like MacPorts.

Precautions may vary on your trust level. I'd backup my personal files and anything else that might be difficult to recreate. The few times I've used open source material, I've only downloaded from trusted sources. Either from the project site or sites they point to. Read the install documentation twice and note any exceptions or requirements.

As DaFlake mentioned, you need to define your focus of interest. If you want to write command line scripts then a scripting tool such as csh, bash, Perl, Python, PHP, etc all work well. I believe Python even has the ability to develop OS X GUI apps. Of course if your aim is to develop full OS X desktop apps limited to running on OS X, then learn Cocoa, the frameworks and tools Apple supplies for free. For cross platform development things get a little tricky, but common ones are Java and RealBasic. There are many development tools available for the Mac and understanding your interests will help narrow down your available choices.

It sounds to me that for now you are interested in how shells work to understand install scripts. The default on the Mac is Bash. I don't know how ofter bash is used in things like install scripts, so perhaps it would be better to learn csh (considered harmful), tcsh, or bourne.

Cool, if there's a PKG to it I could just use that. I just wanted to learn how to do it the hard way so that way it's just more knowledge to have.

I am a newbie when it comes to running a Mac system, so I am not familiar with MacPorts.

I think Scripting would give me a good start to learning, however it is argued that scripting is not the same as programming. This is largely due to scripting not relying on any logic (such as C++ and Java) and does not need to be compiled.

Yes, install scripts from the command line is what I was referring to and the basic concept for this thread. I've had some training in SSH as I used it when I ran Knoppix in my Linux classes.

I apologize for any confusion based on my non-specific goals.

Thank you for all your help, especially xstep
 
Joined
Jun 25, 2005
Messages
3,231
Reaction score
112
Points
63
Location
On the road
Your Mac's Specs
2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
I think Scripting would give me a good start to learning, however it is argued that scripting is not the same as programming. This is largely due to scripting not relying on any logic (such as C++ and Java) and does not need to be compiled.

LOL.

It all requires logic. The need for compiling is irrelevant.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top