Few questions concerning Macs.

  • Thread starter DrKareem
  • Start date
In summary: If you want to use the GUI for anything (like compiling or running the program), you must install XCode.
  • #1
DrKareem
101
1
Hi everybody. I've bought a MacBook a while ago, and it's my first time working on MAC OSX. The transition from PC was quite smooth, but still I have a few questions to ask you guys.

1) Do I need to install any anti-virus program on my system? Or even one of those programs that detects bad malicious cookies or scripts coming from the internet?

2) I noticed that Mac OS X (and later read) that it is very much based on UNIX, so it has a bash shell. I'm wondering if I can add Linux or Unix components to the shell, like put the commands in the bin directory. I'm a linux amateur, I don't know a lot about using it.

3) Is xcode enough for programming? I mean for C/C++ programming. I still haven't figured out how to work it correctly, but I still have to read someo of the documents and FAQs.


Thanks in advance.
 
Technology news on Phys.org
  • #2
1) I've had a mac for years running OS X and never installed an anti-virus program. I haven't had any problems (but that's not saying you wouldn't). It just happens that most viruses are not written to attack macs (low market share), but that could all change with 1 virus. I do know the program most people have on their macs is Norton Antivirus.
 
  • #3
2) I noticed that Mac OS X (and later read) that it is very much based on UNIX, so it has a bash shell. I'm wondering if I can add Linux or Unix components to the shell, like put the commands in the bin directory. I'm a linux amateur, I don't know a lot about using it.

Contrary to Apple's typical nonsense, OS X is not a UNIX. It does not comply with any standards or at the very least, only a subset of the standard (SUSv3, etc.). Bash is largely broken in regards to POSIX compatibility (even in POSIX compatibility mode). The correct classification of OS X is "UNIX-like." (similar situation with Linux)

3) Is xcode enough for programming? I mean for C/C++ programming. I still haven't figured out how to work it correctly, but I still have to read someo of the documents and FAQs.

Xcode is primarily suited for Objective-C work, and some would argue that it fails to do that well. The developer tools ship a number of editting environments, like Emacs. (vim ships by default, IIRC).
 
  • #4
Thanks for the feedback so far. I don't trust Norton Anti-Virus, I used to find it useless when I used to work on PC. It takes up a lot of memory space, and new viruses are written specifically to evade being detected by the big antivirus companies. Plus, it's expensive.

I was trying to get to the fact that Mac OS X is 'Unix-Like', but apparently i failed to express that. I think you're totally right graphic7. What I still want to know though is that if I can still add new instructions to the shell, like maybe a C compiler and similar stuff.
 
  • #5
u don't need to add or download any softwares for c compilers, simply just insert ur mac cd 1 or 2 and download xcode, once u have download it, open the file and select C++ Tool to do C++ programming, I'm not sure which one is recommended for C, but that's it.
 
Last edited by a moderator:
  • #6
DrKareem said:
What I still want to know though is that if I can still add new instructions to the shell, like maybe a C compiler and similar stuff.

Yes. Just go ahead and treat it like you would linux, there are differences but it is most likely you will not encounter them unless you are doing somewhat advanced things.

As far as "adding instructions to the shell" goes, what I recommend is just installing Fink or DarwinPorts. Fink basically just gives you apt-get on OS X, so if you want to install something you just type "apt-get install libpng" or whatever and it compiles it for you and sets up all the shell variables and everything. Hey, why do all the work yourself?

I agree that XCode is not best unless you are specifically doing OS X application development (i.e. cocoa or carbon). For plain C/C++/scripting development I just use a normal text editor, like TextMate, and I run the command line tools. However, you must install XCode whether you plan to use it or not, because (like g_bash said) that is how you get the compiler.
 

1. What is the difference between a Mac and a PC?

Mac is a brand of computers developed and sold by Apple, while PC (personal computer) refers to any computer that is not a Mac. Macs run on Apple's own operating system, macOS, while PCs typically run on Microsoft Windows.

2. Are Macs more expensive than PCs?

In general, Macs are more expensive than PCs. This is due to a combination of factors such as higher quality hardware and software, as well as the exclusivity of the brand. However, some PCs can also be quite expensive, especially those with high-end specifications.

3. Can I run Windows on a Mac?

Yes, it is possible to run Windows on a Mac through virtualization software such as Parallels or Boot Camp. This allows you to have both macOS and Windows operating systems on the same computer.

4. Do I need antivirus software on a Mac?

While Macs are generally less vulnerable to viruses and malware compared to PCs, it is still recommended to have antivirus software installed. This can help protect your computer and personal information from potential threats.

5. How long do Macs typically last?

The average lifespan of a Mac is around 5-8 years, depending on usage and maintenance. However, some Macs can last even longer with proper care and upgrades.

Similar threads

Replies
3
Views
332
  • Programming and Computer Science
Replies
15
Views
5K
  • Computing and Technology
Replies
2
Views
1K
  • Computing and Technology
2
Replies
43
Views
3K
  • Poll
  • Computing and Technology
Replies
14
Views
11K
Replies
8
Views
54K
  • Computing and Technology
Replies
4
Views
2K
  • Programming and Computer Science
Replies
5
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
Back
Top