How to learn Mac programming?

Source: Internet
Author: User
Tags posix

Http://ourcoders.com/thread/show/5550/

@tinyfool read your answer on Quora, "Why is it that programmers are the best profession", plus the idea of programming (but all the time because of excuses ...) Have not started to learn yet. )。 Now determined to act ... Bought a Taiwan RMBP back.

I hope you give some advice ... Start How to learn ... Seeing Quora, you said it was the worst way to start learning programming from large open source software like the Linux kernel. It's easy to get into the wrong way when you're afraid to start learning. So I really want to get your advice.

Want to see this post of everyone can give some advice ^_^

--------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------

@tinyfool brought me here, I'll give you some advices about programming on OS X.

In my opinion, programming on OS X was more easier than it was on IOS and because you had more choices on it.

OS X has five native APIs for your to write and build native apps, they is Carbon, Cocoa, Java, POSIX and X11.

1:first of all, OS X Kernel programming mainly uses C, C + + (Embedded C + + for IOKit) and assembly language. In China, it's barely to see an OS X ' s kernel programmer because the kernel programming have the most steep learning curve . Although OS X ' s kernel is open source, the lack of documents would be the biggest barrel on the you-to-be-a kernel Programm Er. OS X has a special part called IOKit, this is a framework for hardware drivers. It is uses Embedded C + +.

2:carbon and Cocoa use C, C + +, OBJC and Swift as the main programming languages. Most even all of the apps you see on the Mac App Store and IOS App Store is based on them. I Think you ' d better start here. OBJC is good start for object-oriented programming, as well as the Swift is the one of the most language for you learn Func tional programing. No matter which one you'll choose, you can learn and get the most advanced programming experience with them.

3:posix, it's the abbreviations for portable Operating System Interfaces. It is the De-facto standard for those Unix, Unix-like and Linux systems. IT bases on C language APIs. If you want your program can being easily ported to those Pan-unix OS, the POSIX was the best choice.

4:java, OH fuck java, java sucked. As a more than ten years Java programmer, I Beg don't to learn Java language. For native application, the Java App has poor performance and ugly user interfaces. For Web application, those apps based on Python and Ruby would kick your. For the famous Ad of Java "write once, Run anywhere" is a piece of shit, actually we call it "write once, fuck up anywher E ". So, does not to is stupid, does not fuck around.

5:x11, it had something to do with X Windows, which was de-facto standard of GUI apps in the Pan-unix OS. If you want your GUI app can be easily ported and running on Unix and Linux, you'll use this.

6:well, OS X is Unix, Unix are invincible, you can do and wanna do on a UNIX system, so you also can learn all kinds of programming languages on OS X.

7:comments and Advice, star your leaning from OBJC or Swift, good luck.

@Tinyfool dot I come and let me say my personal opinion that

First, the default question is how to learn OS X programming

OS X Programming I personally feel more comfortable than iOS, especially for beginners, more free, and more diverse choices.

OS X itself has five major programming frameworks, Carbon, Cocoa,java,posix and X11, which:

1: In general, OS X kernel-level programming, using three languages, C C + + (Embedded C + + IOKIt), and assembler, is related to POSIX in the programming framework above. This piece of domestic basic no one to do, a lot of foreign, this part of the OS X is open source, want to learn this part of the programming, then start from C + +, slowly look at the kernel code. This part of the drawback is that there are fewer documents, less data, the advantage is that there is source code, you do not have to use an API okay, look at the OS X kernel source code can always find. In addition, there is a special thing here, is IOKit, this framework is Embedded C + + interface for writing drivers, if you want to write to OS X driver, then you have to learn here. If you do not want to make this piece (of course, this piece is hard to learn, there is no foreseeable future, unless you write to me like a book, there is no way to force yourself to see), you continue to look down.

2:carbon,cocoa These two can be used, C, C++,obj-c (APPLESCRIPT-OBJC) and Swift four languages, these believe enough to learn a large array of. So Cocoa learn to write application layer software is much better, here is mainly OBJC and Swift, of course you have to use C I do not stop. You see the Mac app Store,ios app Store, are this kind, relatively easy to get started, you can also sell their own, easy to score, but also easy to have a sense of accomplishment. This piece of information is too much, a bunch of stuff. However, Carbon less use, must make cocoa,carbon this thing do not know when it was clicked, but sometimes you can not open it.

3:posix,os X is a standard UNIX system this you know, one feature of UNIX systems is that it supports the POSIX API, which is why OS X, Linux, and UNIX can migrate code to each other. POSIX is a set of APIs, the C language interface. OS X is based on the Libsystem library, which is the libc of other platforms. In fact, this set of things is also the bottom ground of Cocoa. If you want to do cross-platform development, then learning POSIX is better, but the problem is that you want to use POSIX, you have to learn C, C, you have to learn pointers, learn the pointer is equal to the pit, learn the same thing, learning is not good on the end. C This kind of thing, atomic bomb type of language, anything can do, do anything, is not good control, with objc,swift such ratio, looked very earth. Learn a lot of useful, you finish it basically high-level language you see nothing is indifferent, of course, except for C + +, that is another nightmare, I have not read so far.

4:java, how to say, although I learn Java origin, Tiny seems to be, but this thing I do not feel good, local performance is not good, do server side can now be Python Ruby and other abuse out Xiang. I really don't know what's good about this thing right now. Do not believe that a compilation, running around this nonsense, it is to deceive ghosts listen to, the real description of Java is, a compilation, everywhere not . Of course, this thing is also good, many companies still like him, if you look for a job, this is a good choice, but you remember, a board of bricks killed 10 programmers, 9 and a half will write Java.

5:x11, I don't know much about this, it's about the X-window environment in Unix,linux, the application using X window, the Port to OS X, or the development of an X Window-based program on OS X. For example, you on OS X to other Unix and Linux development GUI program, it is necessary to use this thing, otherwise you have to engage in QT,QT is what, don't ask me, ask me I am also crazy.

6: To know that OS X is Unix,unix is omnipotent, nothing is not competent, in addition to the above things, python,php,ruby,javascript,c# (if you want, this belongs to the self-abuse of a family) anything can be done, anything can be written to see you like.

I personally give you advice, learn OBJC, or Swift, get started, understand programming, and then slowly start writing programs on OS X, slowly practiced hand.

Reply 2 floor Chronos back to 5 hours ago

1 floor @ibuick Thank you very much!

Reply 3 floor Dark back to 4 hours ago

1 floor @ibuick A comparison of Chinese and English, or more Chinese information ah!

Reply 4 Floor Ibuick back to 4 hours ago

3 floor @dark first written in Chinese, English is not latrine,,, and then directly after the first written in English, Chinese can not write.

Reply 5 Floor Chronos back to 3 hours ago

4 Floor @ibuick Wow ... Big don't write again in English! Especially in the Java paragraph, the English is written to look better than the Chinese writing fun ~

Big can you give me a Ssledge invitation code? (o_o)

Reply 6 Floor Lucius_chen back to 8 minutes ago

Java is looking for a job, but what about the follow-up? I'm learning Java now, and I want to be able to do WEB front-end development.

How to learn Mac programming?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.