为程序员设置Mac

时间:2023-01-29 23:30:41

I recently switched over to a MacBook Pro so I'm still really new at Mac software ecosystem. What is the best guide or what tips do you have to quickly get adept at using Mac for developing on both Mac/Unix and MS platforms (*.NET, SharePoint, SQL Server, etc) using VMWare Fusion? For example, I've setup NetBeans, FlexBuilder, Eclipse, TextMate, VMWare Fusion, OpenOffice, FireFox, dragged Terminal.app to my dock, upgraded the Ruby installation and related gems and so on... Things I've not done but looking at (based on other's experiences) include QuickSilver (is it all that different than SpotLight?), MacPorts (or Fink?), getting started with iPhone, Android, and so on. You can tell from my inexperience that I don't know what the best ways of doing things are yet, and don't want to get in the habit of just installing things and then leave files and stuff laying around slowing the system down. If you have any really cool tips about setting up a developer's Mac please share them!

我最近切换到MacBook Pro,所以我仍然是Mac软件生态系统的新手。使用VMWare Fusion在Mac / Unix和MS平台(* .NET,SharePoint,SQL Server等)上快速熟练地使用Mac进行开发有哪些最佳指南或提示?例如,我已经设置了NetBeans,FlexBuilder,Eclipse,TextMate,VMWare Fusion,OpenOffice,FireFox,将Terminal.app拖到了我的Dock,升级了Ruby安装和相关的宝石等等...我没做过的事情但是看(基于其他人的经验)包括QuickSilver(它与SpotLight不同吗?),MacPorts(或Fink?),iPhone,Android等入门。你可以从我的经验中看出,我不知道最好的做事方式是什么,并且不想养成只是安装东西的习惯,然后留下文件和东西,这会减慢系统速度。如果您有关于设置开发人员Mac的任何非常酷的提示,请分享!

Update: The nature of my job is I'm always working with new/different technologies, some Windows/MS based, some not, and with the Mac (and Fusion) even the MS based stuff is more enjoyable to me.

更新:我的工作性质是我总是使用新的/不同的技术,一些基于Windows / MS,一些不是,并且使用Mac(和Fusion)甚至基于MS的东西对我来说更加愉快。

13 个解决方案

#1


Install all the Mac dev stuff, XCode etc., so you get the compilers.

安装所有Mac开发人员,XCode等,以便获得编译器。

For sure, Macports. Look through their catalog and install all the usual packages you're used to from Linux or other systems -- including development-related stuff like flex/bison, emacs, doxygen, m4, perl, python, etc.

当然,Macports。查看他们的目录并安装您在Linux或其他系统中使用的所有常用软件包 - 包括与开发相关的东西,如flex / bison,emacs,doxygen,m4,perl,python等。

I prefer "iTerm" over the built-in terminal. Don't forget to "export COMMAND_MODE=unix2003" that makes a number of things work the way you're used to.

我比内置终端更喜欢“iTerm”。不要忘记“导出COMMAND_MODE = unix2003”,这使得许多事情按照您习惯的方式运行。

I haven't given URLs for any of the things I've mentioned. That's what Google is for.

我没有为我提到过的任何内容提供网址。这就是谷歌的用途。

#2


I'd highly recommend MacPorts - you can quickly and easily install new packages with a simple

我强烈推荐使用MacPorts - 您可以通过简单快速轻松地安装新软件包

sudo port install package-name

Instead of having to deal with browsing a website to find the distribution, download a disk image, and run an installer, or downloading a tarball and untarring it, running a configure script, and running make, etc.

而不是必须处理浏览网站以查找分发,下载磁盘映像,运行安装程序,或下载tarball并解压缩,运行配置脚本和运行make等。

#3


Find some cash and invest in extra memory for your mac. I know it's probably not the tip you want to hear, but honestly, it'll save you frustration in the long run. Apple ships these babies with way less memory than they deserve, and charges an arm and a leg for an expansion. I had a Mac Pro (quad-core Xeon) crawl to a halt until I got some real memory in there.

找一些现金并为你的mac投入额外的内存。我知道这可能不是你想听到的小费,但老实说,从长远来看,它会让你感到沮丧。苹果公司以这样的方式运送这些婴儿的记忆力比他们应得的少,并为一次扩张收取一条胳膊和一条腿。我有一台Mac Pro(四核Xeon)爬行停止,直到我有一些真正的记忆。

Another tip is to get a decent keyboard and mouse. Don't trust Steve Jobs with that "single mouse key for everything" crap. It works for ichat, not for real programming. Get yourself a real keyboard and a real mouse with multiple buttons. Configure your middle scrollwheel button to open expose or whatever it is that shows you all windows. Configure your fourth button for magnification.

另一个提示是获得一个像样的键盘和鼠标。不要相信史蒂夫·乔布斯那个“一键鼠标”的废话。它适用于ichat,而不适用于真正的编程。给自己一个真正的键盘和一个带有多个按钮的真正鼠标。配置中间滚轮按钮以打开曝光或显示所有窗口的任何内容。配置第四个按钮进行放大。

Also, from your description it sounds like you don't really know what it is that you want to develop. If you're doing mac-specific things, get used to XCode ASAP and lose the rest. If you want to be doing windows programming, not sure why you would use a mac. If you want Java, you have Eclipse, you're ready to go.

此外,根据您的描述,听起来您并不真正知道您想要开发的是什么。如果您正在进行特定于mac的事情,请尽快习惯XCode并丢失其余部分。如果你想做Windows编程,不知道为什么要使用mac。如果你想要Java,你就拥有了Eclipse,那么你已经准备好了。

#4


First, install XCode. This gives you the Mac OS X development environment, but most importantly it also installs GCC so you can build both your own projects and applications that are distributed as source code. After that I'd suggest checking out TextMate, a popular text editor for Mac OS X (as seen in the Rails screencasts). If you're an Emacs/Vim user, there's Aquamacs and MacVim.

首先,安装XCode。这为您提供了Mac OS X开发环境,但最重要的是它还安装了GCC,因此您可以构建自己的项目和作为源代码分发的应用程序。之后,我建议查看TextMate,这是一款适用于Mac OS X的流行文本编辑器(如Rails屏幕录像中所示)。如果你是Emacs / Vim用户,那就是Aquamacs和MacVim。

#5


Invest in a good text editor. See the following questions:

投资一个好的文本编辑器。请参阅以下问题:

https://*.com/questions/100084/what-is-a-good-gui-text-editor-for-the-mac Mac text/code editor

https://*.com/questions/100084/what-is-a-good-gui-text-editor-for-the-mac Mac文本/代码编辑器

And by 'invest' I mean both money and/or learning time.

而'投资'我指的是金钱和/或学习时间。

XCode is a good enough editor for Objective-C, but I wouldn't use it as my primary editor for everything.

XCode是一个足够好的Objective-C编辑器,但我不会将它用作我的主要编辑器。

(MacVim is my choice)

(MacVim是我的选择)

#6


  1. Install the latest version of Xcode (you will need this even if your not developing macintosh/iphone applications)
  2. 安装最新版本的Xcode(即使你没有开发macintosh / iphone应用程序也需要这个)

  3. Install macports for most of your OSS tools (you'll need Xcode first)
  4. 为大多数OSS工具安装macports(首先需要Xcode)

  5. To run tools that aren't OSS or are windows only install virtualbox I know there are alernatives (VM fusion is highly rated) but virtual box is free
  6. 要运行不是OSS的工具或者只安装windows的虚拟机,我知道有一些功能(VM融合得到很高的评价),但虚拟机是免费的

  7. Install an IDE if you do not want to use Xcode as your IDE (for example eclipse and netbeans)
  8. 如果您不想将Xcode用作IDE(例如eclipse和netbeans),请安装IDE

Finally if you have some cash

最后,如果你有一些现金

  1. Upgrade the ram if required (sw developers love ram especially if you are running a vm :) )
  2. 如果需要升级ram(sw开发人员喜欢ram,特别是如果你正在运行vm :))

  3. A second display, I can't imagine developing with less than two displays
  4. 第二个显示器,我无法想象使用少于两个显示器进行开发

#7


I did the same in August this year, I bought a Macbook Pro (the small of them but with 200Gb 7200rpm and 4Gb of RAM), and I can tell you about my experience.

我在今年8月做了同样的事情,我买了一台Macbook Pro(其中很小但是有200Gb 7200rpm和4Gb的RAM),我可以告诉你我的经验。

I'm a .NET developer and been ASP programmer for more than 10 years, so all I did was Microsoft related, never ever, aparat of installing and playing with Ubuntu, I had experience in the Linux world.

我是一名.NET开发人员并且已经担任ASP程序员超过10年了,所以我所做的只是微软相关的,从来没有,安装和使用Ubuntu,我有Linux世界的经验。

But my mind was on the iPhone SDK development and I even paid my inscription on the iPhone developer Program, all was lovely, I just loved my new Mac! But... Mac programming is a hobby for me, and believe me, Fusion, and even with my 4Gb and placed 2Gb for each OS, does not move as better as in a "normal" laptop, so after 4 month of struggling I formatted my laptop and created a Bootcamp partition (WOW, now I can use it for Windows!) and Fusion can run that Boot camp partition like a Virtual Machine image, and that is good for little times that I need to do something quick.

但我的想法是关于iPhone SDK开发,我甚至在iPhone开发者计划上付了我的题词,一切都很可爱,我只是喜欢我的新Mac!但是... Mac编程对我来说是一个爱好,相信我,Fusion,甚至我的4Gb并为每个操作系统安装了2Gb,并没有像“普通”笔记本电脑那样更好,所以经过4个月的挣扎我格式化我的笔记本电脑并创建了一个Bootcamp分区(WOW,现在我可以将它用于Windows!)和Fusion可以像虚拟机映像一样运行Boot camp分区,这对于我需要快速做一些事情很有用。

What you refer and as Uri mention, I don't thing that you know what you are going to do, having a "bunch" of apps in the laptop does say that, because, all you needed is Eclipse for everything else and XCode 3.1 with the SDK for Mac related apps, nothing more!

你提到的和Uri提到的,​​我不知道你将要做什么,在笔记本电脑中有一堆“应用程序”确实说,因为,你所需要的只是其他所有的Eclipse和XCode 3.1使用SDK for Mac相关应用程序,仅此而已!

I was like you, but I realized that I didn't open any other programs that those 2, and except for compiling Objective-C code, was the Mac your better choice?

我和你一样,但我意识到我没有打开任何其他程序那些2,除了编译Objective-C代码,Mac是你更好的选择吗?

#8


Instead of vmware fusion, virtualbox.org is free and worth a look.

而不是vmware融合,virtualbox.org是免费的,值得一看。

#9


My choice for a great all-around text editor would be TextWrangler.

我选择一个出色的全能文本编辑器将是TextWrangler。

#10


Make sure you install Developer Tools (XCode) from your OS disc (and don't try and install GNU version over the top of it :P).

确保从操作系统光盘安装开发人员工具(XCode)(并且不要尝试在其顶部安装GNU版本:P)。

You've already done everything I have, except I'm using Virtual Box instead of VMWare.

你已经完成了我所拥有的一切,除了我使用Virtual Box而不是VMWare。

#11


I've found OpenOffice to be very slow compared to the actual Microsoft Office for Mac. If you have some budget, I'd recommend that over OpenOffice.

我发现OpenOffice与实际的Microsoft Office for Mac相比非常慢。如果您有一些预算,我建议通过OpenOffice。

I can second the recommendation for QuickSilver - it's one of the best launchers I've used.

我可以推荐QuickSilver的推荐 - 它是我用过的最好的发射器之一。

For IM clients, if you have contacts outside of the AIM network then you may want to try Adium - a free multi-IM-network chat client that has handy things like searchable transcripts.

对于IM客户端,如果您在AIM网络之外有联系人,那么您可能想要尝试Adium - 一个免费的多IM网络聊天客户端,它具有可搜索的成绩单等便利的东西。

Another general utility that I highly recommend is iStat menus - it gives you a realtime monitor of CPU, memory, disk, etc. right in your menu bar.

我强烈推荐的另一个通用实用程序是iStat菜单 - 它可以在菜单栏中为您提供CPU,内存,磁盘等的实时监控。

#12


QuickSilver is a very good option and yes, it is a bit different from Spotlight due to the large number of plugins you can have. If you have NetBeans, maybe you don't need Eclipse. I'd even say that with TextMate (my editor of choice too), you don't need NetBeans either :)

QuickSilver是一个非常好的选择,是的,它与Spotlight略有不同,因为你可以拥有大量的插件。如果您有NetBeans,也许您不需要Eclipse。我甚至会说使用TextMate(我的选择编辑器),你也不需要NetBeans :)

I second MacPorts, it is more up to date than fink and closer to the FreeBSD ports system (where I come from).

我是第二个MacPorts,它比fink更新,更接近FreeBSD ports系统(我来自哪里)。

#13


Install Windows using Boot Camp. You can then dual boot between OSX and Windows, use windows as normal for MS development, and OSX for your other non MS stuff.

使用Boot Camp安装Windows。然后,您可以在OSX和Windows之间进行双重启动,使用Windows正常进行MS开发,使用OSX进行其他非MS操作。

#1


Install all the Mac dev stuff, XCode etc., so you get the compilers.

安装所有Mac开发人员,XCode等,以便获得编译器。

For sure, Macports. Look through their catalog and install all the usual packages you're used to from Linux or other systems -- including development-related stuff like flex/bison, emacs, doxygen, m4, perl, python, etc.

当然,Macports。查看他们的目录并安装您在Linux或其他系统中使用的所有常用软件包 - 包括与开发相关的东西,如flex / bison,emacs,doxygen,m4,perl,python等。

I prefer "iTerm" over the built-in terminal. Don't forget to "export COMMAND_MODE=unix2003" that makes a number of things work the way you're used to.

我比内置终端更喜欢“iTerm”。不要忘记“导出COMMAND_MODE = unix2003”,这使得许多事情按照您习惯的方式运行。

I haven't given URLs for any of the things I've mentioned. That's what Google is for.

我没有为我提到过的任何内容提供网址。这就是谷歌的用途。

#2


I'd highly recommend MacPorts - you can quickly and easily install new packages with a simple

我强烈推荐使用MacPorts - 您可以通过简单快速轻松地安装新软件包

sudo port install package-name

Instead of having to deal with browsing a website to find the distribution, download a disk image, and run an installer, or downloading a tarball and untarring it, running a configure script, and running make, etc.

而不是必须处理浏览网站以查找分发,下载磁盘映像,运行安装程序,或下载tarball并解压缩,运行配置脚本和运行make等。

#3


Find some cash and invest in extra memory for your mac. I know it's probably not the tip you want to hear, but honestly, it'll save you frustration in the long run. Apple ships these babies with way less memory than they deserve, and charges an arm and a leg for an expansion. I had a Mac Pro (quad-core Xeon) crawl to a halt until I got some real memory in there.

找一些现金并为你的mac投入额外的内存。我知道这可能不是你想听到的小费,但老实说,从长远来看,它会让你感到沮丧。苹果公司以这样的方式运送这些婴儿的记忆力比他们应得的少,并为一次扩张收取一条胳膊和一条腿。我有一台Mac Pro(四核Xeon)爬行停止,直到我有一些真正的记忆。

Another tip is to get a decent keyboard and mouse. Don't trust Steve Jobs with that "single mouse key for everything" crap. It works for ichat, not for real programming. Get yourself a real keyboard and a real mouse with multiple buttons. Configure your middle scrollwheel button to open expose or whatever it is that shows you all windows. Configure your fourth button for magnification.

另一个提示是获得一个像样的键盘和鼠标。不要相信史蒂夫·乔布斯那个“一键鼠标”的废话。它适用于ichat,而不适用于真正的编程。给自己一个真正的键盘和一个带有多个按钮的真正鼠标。配置中间滚轮按钮以打开曝光或显示所有窗口的任何内容。配置第四个按钮进行放大。

Also, from your description it sounds like you don't really know what it is that you want to develop. If you're doing mac-specific things, get used to XCode ASAP and lose the rest. If you want to be doing windows programming, not sure why you would use a mac. If you want Java, you have Eclipse, you're ready to go.

此外,根据您的描述,听起来您并不真正知道您想要开发的是什么。如果您正在进行特定于mac的事情,请尽快习惯XCode并丢失其余部分。如果你想做Windows编程,不知道为什么要使用mac。如果你想要Java,你就拥有了Eclipse,那么你已经准备好了。

#4


First, install XCode. This gives you the Mac OS X development environment, but most importantly it also installs GCC so you can build both your own projects and applications that are distributed as source code. After that I'd suggest checking out TextMate, a popular text editor for Mac OS X (as seen in the Rails screencasts). If you're an Emacs/Vim user, there's Aquamacs and MacVim.

首先,安装XCode。这为您提供了Mac OS X开发环境,但最重要的是它还安装了GCC,因此您可以构建自己的项目和作为源代码分发的应用程序。之后,我建议查看TextMate,这是一款适用于Mac OS X的流行文本编辑器(如Rails屏幕录像中所示)。如果你是Emacs / Vim用户,那就是Aquamacs和MacVim。

#5


Invest in a good text editor. See the following questions:

投资一个好的文本编辑器。请参阅以下问题:

https://*.com/questions/100084/what-is-a-good-gui-text-editor-for-the-mac Mac text/code editor

https://*.com/questions/100084/what-is-a-good-gui-text-editor-for-the-mac Mac文本/代码编辑器

And by 'invest' I mean both money and/or learning time.

而'投资'我指的是金钱和/或学习时间。

XCode is a good enough editor for Objective-C, but I wouldn't use it as my primary editor for everything.

XCode是一个足够好的Objective-C编辑器,但我不会将它用作我的主要编辑器。

(MacVim is my choice)

(MacVim是我的选择)

#6


  1. Install the latest version of Xcode (you will need this even if your not developing macintosh/iphone applications)
  2. 安装最新版本的Xcode(即使你没有开发macintosh / iphone应用程序也需要这个)

  3. Install macports for most of your OSS tools (you'll need Xcode first)
  4. 为大多数OSS工具安装macports(首先需要Xcode)

  5. To run tools that aren't OSS or are windows only install virtualbox I know there are alernatives (VM fusion is highly rated) but virtual box is free
  6. 要运行不是OSS的工具或者只安装windows的虚拟机,我知道有一些功能(VM融合得到很高的评价),但虚拟机是免费的

  7. Install an IDE if you do not want to use Xcode as your IDE (for example eclipse and netbeans)
  8. 如果您不想将Xcode用作IDE(例如eclipse和netbeans),请安装IDE

Finally if you have some cash

最后,如果你有一些现金

  1. Upgrade the ram if required (sw developers love ram especially if you are running a vm :) )
  2. 如果需要升级ram(sw开发人员喜欢ram,特别是如果你正在运行vm :))

  3. A second display, I can't imagine developing with less than two displays
  4. 第二个显示器,我无法想象使用少于两个显示器进行开发

#7


I did the same in August this year, I bought a Macbook Pro (the small of them but with 200Gb 7200rpm and 4Gb of RAM), and I can tell you about my experience.

我在今年8月做了同样的事情,我买了一台Macbook Pro(其中很小但是有200Gb 7200rpm和4Gb的RAM),我可以告诉你我的经验。

I'm a .NET developer and been ASP programmer for more than 10 years, so all I did was Microsoft related, never ever, aparat of installing and playing with Ubuntu, I had experience in the Linux world.

我是一名.NET开发人员并且已经担任ASP程序员超过10年了,所以我所做的只是微软相关的,从来没有,安装和使用Ubuntu,我有Linux世界的经验。

But my mind was on the iPhone SDK development and I even paid my inscription on the iPhone developer Program, all was lovely, I just loved my new Mac! But... Mac programming is a hobby for me, and believe me, Fusion, and even with my 4Gb and placed 2Gb for each OS, does not move as better as in a "normal" laptop, so after 4 month of struggling I formatted my laptop and created a Bootcamp partition (WOW, now I can use it for Windows!) and Fusion can run that Boot camp partition like a Virtual Machine image, and that is good for little times that I need to do something quick.

但我的想法是关于iPhone SDK开发,我甚至在iPhone开发者计划上付了我的题词,一切都很可爱,我只是喜欢我的新Mac!但是... Mac编程对我来说是一个爱好,相信我,Fusion,甚至我的4Gb并为每个操作系统安装了2Gb,并没有像“普通”笔记本电脑那样更好,所以经过4个月的挣扎我格式化我的笔记本电脑并创建了一个Bootcamp分区(WOW,现在我可以将它用于Windows!)和Fusion可以像虚拟机映像一样运行Boot camp分区,这对于我需要快速做一些事情很有用。

What you refer and as Uri mention, I don't thing that you know what you are going to do, having a "bunch" of apps in the laptop does say that, because, all you needed is Eclipse for everything else and XCode 3.1 with the SDK for Mac related apps, nothing more!

你提到的和Uri提到的,​​我不知道你将要做什么,在笔记本电脑中有一堆“应用程序”确实说,因为,你所需要的只是其他所有的Eclipse和XCode 3.1使用SDK for Mac相关应用程序,仅此而已!

I was like you, but I realized that I didn't open any other programs that those 2, and except for compiling Objective-C code, was the Mac your better choice?

我和你一样,但我意识到我没有打开任何其他程序那些2,除了编译Objective-C代码,Mac是你更好的选择吗?

#8


Instead of vmware fusion, virtualbox.org is free and worth a look.

而不是vmware融合,virtualbox.org是免费的,值得一看。

#9


My choice for a great all-around text editor would be TextWrangler.

我选择一个出色的全能文本编辑器将是TextWrangler。

#10


Make sure you install Developer Tools (XCode) from your OS disc (and don't try and install GNU version over the top of it :P).

确保从操作系统光盘安装开发人员工具(XCode)(并且不要尝试在其顶部安装GNU版本:P)。

You've already done everything I have, except I'm using Virtual Box instead of VMWare.

你已经完成了我所拥有的一切,除了我使用Virtual Box而不是VMWare。

#11


I've found OpenOffice to be very slow compared to the actual Microsoft Office for Mac. If you have some budget, I'd recommend that over OpenOffice.

我发现OpenOffice与实际的Microsoft Office for Mac相比非常慢。如果您有一些预算,我建议通过OpenOffice。

I can second the recommendation for QuickSilver - it's one of the best launchers I've used.

我可以推荐QuickSilver的推荐 - 它是我用过的最好的发射器之一。

For IM clients, if you have contacts outside of the AIM network then you may want to try Adium - a free multi-IM-network chat client that has handy things like searchable transcripts.

对于IM客户端,如果您在AIM网络之外有联系人,那么您可能想要尝试Adium - 一个免费的多IM网络聊天客户端,它具有可搜索的成绩单等便利的东西。

Another general utility that I highly recommend is iStat menus - it gives you a realtime monitor of CPU, memory, disk, etc. right in your menu bar.

我强烈推荐的另一个通用实用程序是iStat菜单 - 它可以在菜单栏中为您提供CPU,内存,磁盘等的实时监控。

#12


QuickSilver is a very good option and yes, it is a bit different from Spotlight due to the large number of plugins you can have. If you have NetBeans, maybe you don't need Eclipse. I'd even say that with TextMate (my editor of choice too), you don't need NetBeans either :)

QuickSilver是一个非常好的选择,是的,它与Spotlight略有不同,因为你可以拥有大量的插件。如果您有NetBeans,也许您不需要Eclipse。我甚至会说使用TextMate(我的选择编辑器),你也不需要NetBeans :)

I second MacPorts, it is more up to date than fink and closer to the FreeBSD ports system (where I come from).

我是第二个MacPorts,它比fink更新,更接近FreeBSD ports系统(我来自哪里)。

#13


Install Windows using Boot Camp. You can then dual boot between OSX and Windows, use windows as normal for MS development, and OSX for your other non MS stuff.

使用Boot Camp安装Windows。然后,您可以在OSX和Windows之间进行双重启动,使用Windows正常进行MS开发,使用OSX进行其他非MS操作。