Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 3, 2012, 12:39 AM   #1
swimanole
macrumors newbie
 
Join Date: Aug 2012
Location: NC
New to Programming

I am a computer science major just getting started with trying to program. I am currently learning Java and C but I'm struggling with how to physically write the code using my 2011 13" MacBook Pro. I don't really want to buy a PC but a lot of people are recommending I do that. Can I get some advice? Sorry, I know this is really open-ended. Thank you!
swimanole is offline   1 Reply With Quote
Old Nov 3, 2012, 12:59 AM   #2
zzLZHzz
macrumors regular
 
Join Date: Mar 2012
what wrong with java on a mac?

anyway if you need windows, you could always install windows on your mac
zzLZHzz is offline   0 Reply With Quote
Old Nov 3, 2012, 01:00 AM   #3
lee1210
macrumors 68040
 
lee1210's Avatar
 
Join Date: Jan 2005
Location: Dallas, TX
A few things:
If you HAD to run windows or linux, you could do it on your Mac. You could boot these natively on your Mac or run them in a virtualization program.

There's NO reason you can't program C or Java on your Mac. The only way that you'd have a problem is if there is a binary library you needed to use that was only available for another platform, but that is highly unlikely.

So now you need tools. What tools are your classmates using in Windows or Linux that you don't have available on OS X? Eclipse is the most common Java development environment and is available on all 3 platforms. The most popular C compilers are gcc, and now llvm is gaining some traction. These are available on any of these platforms. If you need an IDE for C, XCode can handle that for you without issue (I think Eclipse can to given the right components, plugins, what-have-you). So what do you *need* that's not available? What have you been told to use that you don't have a replacement for?

In short: OS X is a great development platform. It is a very "desktop-friendly" Unix with broad support for tons of languages.

-Lee
lee1210 is online now   1 Reply With Quote
Old Nov 3, 2012, 01:18 AM   #4
swimanole
Thread Starter
macrumors newbie
 
Join Date: Aug 2012
Location: NC
I recently downloaded eclipse for Java and I am adapting to it. We use a gcc compiler for C. I am not at all familiar with Xcode and everywhere I look to find out how to use it seems to be more confusing. Is there any way to use a gcc compiler without Xcode? If not, where is the best place to understand programming using Xcode?
swimanole is offline   0 Reply With Quote
Old Nov 3, 2012, 02:32 AM   #5
lee1210
macrumors 68040
 
lee1210's Avatar
 
Join Date: Jan 2005
Location: Dallas, TX
If you install XCode, the commandline tools should come with it. You can run gcc directly through the terminal.

-Lee
lee1210 is online now   0 Reply With Quote
Old Nov 3, 2012, 01:46 PM   #6
swimanole
Thread Starter
macrumors newbie
 
Join Date: Aug 2012
Location: NC
Thank you!
swimanole is offline   0 Reply With Quote
Old Nov 4, 2012, 10:59 AM   #7
Jodles
macrumors regular
 
Join Date: Dec 2008
I echo all of the above... Learn to love the terminal and pick up vim (my personal fav) or emacs.
Jodles is offline   0 Reply With Quote
Old Nov 5, 2012, 05:50 PM   #8
itsmrjon
macrumors regular
 
Join Date: Jun 2011
Location: Chicago
Quote:
Originally Posted by swimanole View Post
I am a computer science major just getting started with trying to program. I am currently learning Java and C but I'm struggling with how to physically write the code using my 2011 13" MacBook Pro. I don't really want to buy a PC but a lot of people are recommending I do that. Can I get some advice? Sorry, I know this is really open-ended. Thank you!
Physically writing code:
Most of us rely on vim, nano, or emacs. Some people use Eclipse, many of the rest use TextMate. I personally like TextMate for large local projects (I typically work on clusters, so then I rely on vim).

Buying a PC: Our entire lab (computational research lab) recently switched to Mac because it was EASIER for the quantity of programming we do. Single UNIX like operating system that allows us to even open the occasional garbage .PPTX or .DOCX files people send (god I wish business learned TeX).

Get all your compilers from the XCode CLI tools, and work in a unix like environment from there. Most IDE's will only slow you down when you learn to truly unleash the power of vim or textmate.
__________________
You can have your own opinions, but you can't have your own facts.
itsmrjon is offline   0 Reply With Quote
Old Nov 5, 2012, 06:03 PM   #9
macuser1232
macrumors 6502a
 
Join Date: Jan 2012
I have the same exact computer as you and I love programming on my Mac! It's amazing! What's troubling you?
__________________
Early 2011 13" MacBook Pro, i5 2.3 GHz, 8 GB RAM, 320 GB HD ; 2 Gen 8 GB iPod Touch
macuser1232 is offline   0 Reply With Quote
Old Nov 6, 2012, 07:36 AM   #10
960design
macrumors 6502a
 
Join Date: Apr 2012
Location: Destin, FL
Quote:
I am currently learning Java and C but I'm struggling with how to physically write the code using my 2011 13" MacBook Pro.
I use a macbook pro 2012 15" (non retina) and an iMac 2012 21.5" ( actually 2 of them ) at work.

I use Eclipse to write Java today. I started with Forte and Java back in the day ( 1994 or 1995?), but industry standards slowly erroded my determination to love Netbeans ( which I still have a huge fondness for ).
I use XCode to write C ( actually objective C but who's nitpicking ).

Learning to write a programming language is just as hard as learning a new language. How long would it take you to learn Japanese or Russian? The more you are surrounded by people that speak the language the faster you pick up on it. Same goes with programming languages. The cool thing is that once you learn one, Java for example, you can use alot of that knowledge towards different languages such as C/C++ or C# or even PHP.

Google for some tutorials in how to use eclipse and it will quickly become one of your favorite tools. A quick search yielded this: http://eclipsetutorial.sourceforge.n...lbeginner.html ( I don't have time to look through the tutorial to see if it can help, but thought it may get you in the right direction. ) Out of time, compile is done.

just trying to help
__________________
TI-99/4A, tape cassette, 12" B&W Zenith

Last edited by 960design; Nov 6, 2012 at 07:45 AM.
960design is offline   0 Reply With Quote
Old Nov 6, 2012, 11:55 AM   #11
firewood
macrumors 603
 
Join Date: Jul 2003
Location: Silicon Valley
Quote:
Originally Posted by lee1210 View Post
If you install XCode, the commandline tools should come with it. You can run gcc directly through the terminal.
The command-line tools don't come with Xcode 4.x. They are an extra download from Apple that Xcode can do using Preferences/Downloads/Components.

gcc is no longer included with Xcode. Instead, the C compiler commands are all aliases to llvm/clang. However you can use Xcode to build versions of gcc if you really need it.

A CS student who can't figure out how to manage the differences between using command-line tools on a Windows PC and command-line tools on a Mac isn't going to get very far.
firewood is offline   1 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Mac programming should be more like iOS programming. moonman239 Mac Programming 13 Feb 17, 2014 01:37 PM
Help with C programming. Meitou Mac Programming 2 Sep 21, 2012 01:36 PM
C++ programming jmfel1926 Mac Programming 4 Sep 14, 2012 07:21 PM

Forum Jump

All times are GMT -5. The time now is 12:58 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC