10 things every Mac coder should know

From Mac vs. Windows file systems to unique language features. Here are ten things every Mac OS coder should know

By

  • unix Learn UNIX right away
  • xcode Install Xcode right away
  • swift Swift is open source
  • windows Run Windows inside OS X
  • linux Don't forget Linux
  • github mark Sign up for GitHub
  • ipadpro You code for iOS, not on iOS
  • stackexchange Stack Exchange
  • sip System Integrity Protection
  • programmers Programmers love OS X
  • More stories
Next Prev

10 things every Mac OS X coder should know: UNIX

Programming on an Apple Mac computer is a joy, and there is no shortage of eager developers working on OS X. Here are 10 vital things that every budding (and even seasoned) OS X programmer should know.

Read next: Complete guide to coding and programming on a Mac

One of the reasons OS X is such a stable, and widely admired, operating system is because it's built upon UNIX. UNIX is an operating system from the 1970s; that was used by government departments and universities.

UNIX is still in use today, and variations of it underpin most operating systems (except Windows). As soon as you start programming on a Mac, you should be learning how to use UNIX. Open the Terminal app and you will be in the UNIX command line, and can enter UNIX commands directly.

UNIX is used to find, move, replace, create and delete text files, including the ones you create for your programs (and those created by your programs). With some programming languages, you need to compile and run programs from the Terminal command line. Learning UNIX is a must for all programmers, and OS X is the ideal environment to get started.

See also:

Next »

Next Prev unix

Programming on an Apple Mac computer is a joy, and there is no shortage of eager developers working on OS X. Here are 10 vital things that every budding (and even seasoned) OS X programmer should know.

Read next: Complete guide to coding and programming on a Mac

One of the reasons OS X is such a stable, and widely admired, operating system is because it's built upon UNIX. UNIX is an operating system from the 1970s; that was used by government departments and universities.

UNIX is still in use today, and variations of it underpin most operating systems (except Windows). As soon as you start programming on a Mac, you should be learning how to use UNIX. Open the Terminal app and you will be in the UNIX command line, and can enter UNIX commands directly.

UNIX is used to find, move, replace, create and delete text files, including the ones you create for your programs (and those created by your programs). With some programming languages, you need to compile and run programs from the Terminal command line. Learning UNIX is a must for all programmers, and OS X is the ideal environment to get started.

See also:

 

10 things every Mac OS X coder should know: Xcode

Apple Xcode is the IDE (Integrated Developer Environment) built by Apple for programmers. It's a great program that enables you to write programs in Apple's Swift language, and Objective-C (and other C-based languages).

Even if you are learning other languages, such as Python or C, then you should install Xcode regardless. Xcode also installs a set of tools known as the Command Line Tools, which are used in Terminal for compiling and running other software.

Xcode is a great developer environment too, and you really can't be taken seriously as a developer on a Mac if you haven't at least installed it.

See: Best Mac for app development

 

10 things every Mac OS X coder should know: Swift

Swift is Apple's new developer language that replaces Objective-C. It's a wonderful modern language that has a simple syntax (similar to Java or Python) and lots of advanced features. It manages memory automatically and cleans up after itself (allowing you to focus on the fun stuff).

Apple made Swift open source in 2015, and since then you've been able to view Swift code on the Swift GitHub page. This is a big deal because Swift is moving beyond OS X and onto other platforms, especially Linux. We may even see Google drop support for Java in favour of Swift.

Even if you're not learning Swift just yet, it's great to follow Swift on GitHub and see what changes Apple are implementing.

See also: Swift 3.0's new features and Apple makes Swift open source

 

10 things every Mac OS X coder should know: Windows virtualisation

The Windows vs. OS X argument isn't going to vanish any time soon, but here's the best bit: you can run both at the same time on a Mac.

Installing Windows inside OS X, in a virtual environment, is a great idea. With Windows installed you can code on a Mac, and check how your code runs on a PC. This is especially important for web designers who need to ensure that code works across platforms efficiently.

Installing Windows on your Mac is easy with software like VirtualBox or Parallels. Windows 10 is incredibly lightweight too, making it an ideal candidate for running in a virtual environment.

See: How to install and run Windows on any Mac

 

10 things every Mac OS X coder should know: Linux

OS X is a UNIX-based operating system, but Linux is too (albeit based on a free clone of UNIX called "GNU").

Linux is an incredibly popular operating system amongst developers, so you should ensure you have a copy of Linux running alongside OS X.

There are many different versions of Linux, known as "distributions". Most distributions are free, and like Windows you can install them inside OS X using virtualisation software.

See: How to install & set up Linux on a Mac

 

10 things every Mac OS X coder should know: Git and GitHub

Git is a program known as a "versioning tracker". With Git installed you can start backing up versions of your programs online. You can then switch back to earlier versions of code, or create spin-off versions (known as "branches") that enable you to test out ideas. If they work you can merge them into your program; if not just drop them.

There's a site called GitHub that provides free online storage for your code (although it is shared publically; you have to pay for a private account). Both Git and GitHub are very popular names amongst the developer community. Make sure you sign up for GitHub and learn to use Git as soon as possible.

 

10 things every Mac OS X coder should know: Code for iOS

Apple makes OS X devices (Mac-based) and iOS devices (iPad and iPhone). You build software for iPads and iPhones on the Mac. So don't get an iPad if you want to learn to program.

The iPad Pro is a great business and educational tool, but its usefulness to programmers is extremely limited. While one program, Pythonista, enables you to create code it's hamstrung by Apple rules (you can't import and export code).

If you want to learn to program, then stick with your Apple Mac.

 

10 things every Mac OS X coder should know: Stack Exchange

Stack Exchange is your new best friend as a programmer. Stack Exchange is a platform for asking questions, and getting answers. There are dozens of sites in Stack Exchange, but the one you need to know most is Stack Overflow.

On this website, you'll find answers to just about every question. And any questions you do ask will be answered quickly, and clearly.

Stackoverflow is so popular that a common meme amongst developers is this mythical book: O'Reilly Essential Guide to Copying and Pasting from Stack Overflow.

Don't copy and paste from Stack Overflow. It's bad form. Use it to learn answers to your questions.

 

10 things every Mac OS X coder should know: SIP

System Integrity Protection was a new feature introduced by Apple in OS X El Capitan.

Also known as "rootless mode," SIP prevents programs from accessing and changing files on the root of your hard drive and in certain folders: /System

/usr, /bin, /sbin and apps that were preinstalled with OS X.

Even if you enter your admin password, you can't make changes to these folders. You can't add, or remove files. This quickly becomes a pain for the seasoned programmer, who need to access root folders to install packages, modules, and other programming bits and pieces.

You turn off SIP using the Recovery Partition of your Mac, but you should be careful to turn SIP back on as soon as you have finished installing your modules. Apple included SIP for a reason, and it does offer protection. Learn to turn it on, and off, as needed.

See also: How to use Disk Utility in Mac OS X: Get more from Disk Utility in El Capitan and other versions of Mac OS X

 

10 things every Mac OS X coder should know: Programmers love OS X

Developers are huge fans of OS X, so don't be ashamed of using a Mac as a programmer. Macs are widely used by students and professors at MIT, Harvard, Stanford and other educational establishments. And Google employees use Macs extensively.

Don't become a slave to any particular piece of hardware, or software (the best computer for programming is the one that gets the job done). But don't be ashamed to use a Mac to develop software; you're in good company.

See also: Why programmers think Mac OS X is the best operating system to use for coding

Elsewhere on IDG sites
OnePlus 5T review: Hands-on

OnePlus 5T review: Hands-on

Illustrator Andrés Lozano on his improv line work, brazen use of colours & hand sketching

Illustrator Andrés Lozano on his improv line work, brazen use of colours & hand sketching

iPhone X review

iPhone X review

Comment envoyer gratuitement des gros fichiers ?

Comment envoyer gratuitement des gros fichiers ?