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

arachn1d

macrumors member
Original poster
Jun 7, 2006
67
0
I bought my mac basically for programming. What are the MUST applications? So far I have textmate.

I want to study ruby and php.

What do I need on my computer for local development, and what do I need to lower my stress levels by helpful applications?

Thanks,
Daniel
 

Foggy

macrumors 6502a
Jul 4, 2006
513
5
London, UK
After 12 years web programming I still use VI/VIM. I have tried all manner of applications and IDE's but still always end up back at VIM.
 

Eraserhead

macrumors G4
Nov 3, 2005
10,434
12,250
UK
I'd install the Apple development tools so you get a lot of development stuff (like 'make') installed on your computer, you also get the option to use XCode though I don't think it's that useful for PHP...
 

savar

macrumors 68000
Jun 6, 2003
1,950
0
District of Columbia
Foggy said:
After 12 years web programming I still use VI/VIM. I have tried all manner of applications and IDE's but still always end up back at VIM.

Haha, I use vi at work ... but I would never use it for files stored locally.

(although I do find myself typing vi commands in PSPad sometimes)
 

rtharper

macrumors regular
Sep 6, 2006
201
0
Oxford, UK
Foggy said:
After 12 years web programming I still use VI/VIM. I have tried all manner of applications and IDE's but still always end up back at VIM.

I'll step into the fire and say I prefer Emacs for all my programming. I learned it before I experienced vi, and I just found I liked the interface and extensibility ever. I use LaTeX for all of my word processing/typesetting needs, and AuCTeX way to edit LaTeX files.

There is a nice Aqua-native version of Emacs called AquaMacs (shocking, I know) that can be found at http://aquamacs.org/
 

Foggy

macrumors 6502a
Jul 4, 2006
513
5
London, UK
The problem is that VIM is so damn fast to edit text files that nothing else really compares. Also the fact that 12 years on and I am still learning new commands!!
 

Krevnik

macrumors 601
Sep 8, 2003
4,100
1,308
Heath said:
Don't forget all the other things you'll need too.
A version control system, backup software, automated build software, and unit testing software. All are a must if you're going to be getting into programming seriously!

http://www.pragmaticprogrammer.com

If you want to cover that, XCode installs CVS, and in Leopard XCode will include Subversion out of the box (yay), so verson control is covered.

Automated build software is not included, but that doesn't stop you from writing a quick-and-dirty one in Perl or Unix scripts. I wrote one up for Subversion in about a week (not a 40-hour week, more like a 8-hours) as a Perl refresher project. Subversion is best for this I find, since you can actually assign arbitrary metadata to a project's directory, which lets me keep track of build numbers and the like quite easily, giving me the tools for some very powerful reporting... such as being able to tell the end-user which build their check-in will appear, and so on.

Unit testing is also included in the box with XCode, but it isn't as polished as it could be right now. The guy who wrote OCUnit has had his framework included with XCode for a couple minor versions now, and Apple worked with him to include a C/C++ verison of the unit testing framework as well. Since these are just build targets, it is possible (although frustratingly difficult) to automate your unit tests as long as: A) the user whom you are building is actually logged into the GUI, or B) your app has no GUI.
 

Foggy

macrumors 6502a
Jul 4, 2006
513
5
London, UK
HiRez said:
Is that a good thing? :confused:

Actually I think it is a testament to how damn powerful VI is - its not like I learn something new every day but every once in a while I come across something I hadnt seen before. I never bothered reading manuals for it, just got stuck in when I started and over time built up knowledge. Didnt know what the 'record' function was about until a couple of years ago and only really got into using macros and registers over the last year or so.
 

Krevnik

macrumors 601
Sep 8, 2003
4,100
1,308
Foggy said:
Actually I think it is a testament to how damn powerful VI is - its not like I learn something new every day but every once in a while I come across something I hadnt seen before. I never bothered reading manuals for it, just got stuck in when I started and over time built up knowledge. Didnt know what the 'record' function was about until a couple of years ago and only really got into using macros and registers over the last year or so.

Yes, VI is powerful, but at the same time, I find it troublesome to work with. Not that it isn't a good editor, but that it leads oneself to having to read the manual to get past the initial learning curve just to edit a text document. And reading the manual to figure out how to access internal help/docs/etc is pretty poor user design, IMO.

On the flip-side, if you want a powerful, extendable editor with a GUI, TextMate can't really be beaten for code these days.
 

Foggy

macrumors 6502a
Jul 4, 2006
513
5
London, UK
Took me about a week to get used to VI, once used to it it is hard to use anything else.

New to macs though and TextMate looks frikkin sweet - gonna have to test it out!
 

Jeromie

macrumors member
Jan 28, 2005
50
0
Most of the recommendations have focused on text editors, but I can assure you that Textmate will be perfectly serviceable in that department. I use it every day and love it. It's the first text editor that made me think I could take the pragmatic programmers' advice to use the same editor for all tasks.

If you're going to stick with textmate, I'd recommend getting the GetBundle bundle. While you may not need it for a while (php and ruby/rails support is great out of the box... er, internet), it does make updating and managing your bundles pretty nice.

Speaking of bundles, I'd learn how to take advantage of the automation that textmate allows. (this goes for any editor you end up in.) Learn to record macros (so obvious in textmate I hesitate to call it learning), pay attention to the available snippets and other keyboard shortcuts, and learn to create your own snippets/commands. There will come some point in the future where you find yourself reusing similar code structure or a command line utility, and the tools in textmate make it a breeze to automate those things.

The recommendation for rubygems and rails makes a lot of sense if you're looking at php and ruby. I'm guessing you're interested in ruby for web development, and rails is a lot of fun to play with. Probably the best thing I can recommend to improve your workflow is a book. The second edition of Agile Web Development with Rails is available as a pdf right now. It may be the best rails book available at the moment.

I also second the call for version control. Even if you're just developing on your own, get used to putting all of your code in a version control system. Your life will be MUCH easier when you decide to try something, find it doesn't work, and don't quite remember what you did before you broke your code. It's way better to use version control than end up with 5 similarly named but slightly functionally different files. Trust me, I've done it both ways. And there's a subversion bundle for textmate that makes it easy to integrate.

If you are going to be sharing a project, some sort of bug tracking software is nice. It helps keep track of what people are working on, and provides some focus on where to go next.

I'd also recommend learning to be happy in Terminal. You'll need it for rails, and there are a lot of tools available there if you know how to use them. Oh, and if you're using ruby, don't underestimate the power of an interactive interpreter (irb for ruby) to try stuff out in. It's a really nice sandbox at times. The same goes for python, which I very much enjoy developing in.

If you have any questions about particular pieces of your workflow, I'd encourage asking for clarification. It's hard to think of all the pieces that make things go smoothly from day to day. And there's still a lot I could learn, too!
 

Mantat

macrumors 6502a
Sep 19, 2003
619
0
Montréal (Canada)
Textmate is the way to go if you dont have previous experience with other editors. Just make sure you learn one new trick everyday!

I am a big RoR fan. Its super fast to learn and use and is very Appleish: everything is included right out of the box. You use the same language for everything. This is an insane time saver!

As others have said, install SVN, you can commit and dif files right from Textmate.

Finaly, my best advice would be to drop PHP. Even tho it is used in many business, this (and Visual Basic) is the worst way to learn to program. Great things can be done with it, but it is so much more troubles than doing it in a good OO language (java) or a great one (= Ruby).

The best book you can get to learn RoR is Agile web dev with Rails as someone else mentioned. Get the eBook. Its cheap and totaly worth it!

Finaly, my last advice for you is to get Firefox with the Firebug plugging AND Safari with the webdev tools. They both have their strenght when its time to debug your page.

Oh.. for the CSS, there is also CSSEdit but sometimes it screw up the CSS so you have to be carefull.

Good luck
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.