![]() |
Newbie who wants to program. What language do I learn?
Ok, I'm 16 and I want to start learning how to create apps in Xcode but the problem is that I'm not sure which language to learn. The only language that I know is xhtml and I just started css but neither of them are really programing.:rolleyes: I've been looking at different things like Java, C++ and Objective-C. Is Java worth learning or is it a dying languege? And I'm not sure which is better: Carbon or Cocoa. What I do know is that you can do C++ in Carbon and Objective-C in Cocoa but can it be the other way around?
So which of the three should I start first?:Java, C++, or Objective-C? Thanks, |
Apple recommends that new development be done with Cocoa.
And for Cocoa, the best language is Objective-C. There aren't really any good alternatives for Cocoa at the moment. You should buy a book on Cocoa and possibly one on Objective-C. See the books section of www.cocoadev.com It is also possible to use AppleScript for relatively simple Cocoa apps. Java is worth learning if you want to do cross-platform development, but isn't really recommended for creating apps that take advantage of Apple technologies. |
yea, i would learn apple script studio first
if you have no programing background, the last thing you want to do is start learning a C language before you even know what an if statment is |
At your age, I think I'd go for JavaScript first... not Java or C.
It's a pretty easy language to learn, but the principles and syntax of JavaScript will translate somewhat to other programming languages and JavaScript is useful in many contexts on the Mac... it can be a part of a Cocoa app or AppleScript applet or it can be part of a C or Java program and it's at the heart of every Dashboard widget. |
I dabbled in Applescript last fall but never really got into it. I tried a bunch applescripts books from our library. I'll look into javascript and try applescript again. Javascript can be put in html right? If so I'm probably going to have to learn it anyway with my interest in web design. Thanks.
|
AppleScript Studio is a good starting language.
Back in OS 9, I started to use SilverCreator. It's also for OS X. It's geared towards simple games, and is a little slow, but works quite well for learning how to program.The site just went under reconstruction, so the site is all broken. A temporary site is available at http://www.silvernetworks.net Now I'm on to AppleScript Studio and am just starting to learn Java. |
Quote:
Remember that there's nothing in AppleScript Studio that doesn't exist in Cocoa or Carbon, and for the Cocoa stuff, it's almost always easier. Setting the text inside a text field inside a tab view in AppleScript Studio: set contents of text field "someField" of tab view item "tabViewItem" of tab view "tabView" of window "aWindow" to "your ad here" And now, Cocoa using Obj-C: [someField setStringValue:@"your ad here"]; I don't mean to start a language war, of course, but if someone wants to get into programming seriously, you can't steer them toward AppleScript because it's easier, because it's really not. As far as the "if statement" thing goes, you're going to have to learn what an "if" statement is in ANY language, be it AppleScript, C, C++, Obj-C, Java, C#, or whatever else. Saying you should start with AppleScript because you don't know what an "if" statement is, that's ridiculous. |
To be more contributory:
Quote:
Quote:
It's much easier to create and manage user interfaces with Cocoa, among other things, because the Cocoa APIs give you a ton of stuff "for free", meaning that the Apple/NeXT engineers did a lot of work to take a bunch of the work away from you, so you can spend more time designing rather than coding tedious crap that should be done for you. In the end, if you can wrap your head around one language, you can wrap your head around any language. At first, this contradicts my first post, but my earlier point was that AppleScript's syntax and language constructs will just confuse you when you go to learn something lower-level--I can't see the benefit in starting there on the claim of "other stuff is harder", as I strongly disagree that it's easier than learning Objective-C. |
I think before you begin with obj c or c++, you should learn c first. obj c and c++ are based on c. At 16, you can learn them all in a couple of years with practice and discipline.
|
Quote:
* After learning a little bit about C first, of course, to understand the basics. Control statements, types, structs, pointers, etc. If you don't understand what a pointer is, you're screwed. ;) I'd say go get a copy of the following two books: The C Programming Language - This is the book on C, written by Dennis Ritchie (creator of the C language) and Brian Kernighan (a Bell Labs alum who helped create awk, among other accomplishments). The book is often referred to as "The White Book" or simply "K&R". http://www.amazon.com/C-Programming-.../dp/0131103628 Cocoa Programming for Mac OS X - Considered by many to be the best intro to Cocoa, written by Aaron Hillegass, founder of Big Nerd Ranch. http://www.amazon.com/Cocoa-Programm.../dp/0321213149 This book, I've never seen, but I've heard a lot of good things about it: Programming in Objective-C - Supposedly more in-depth than the Hillegass book, because its focus is not Cocoa (or any other API), but rather the core Obj-C language itself. Not a requirement for getting into Mac OS X programming, as many Mac programmers have never read it, but it seems like it would be a great book to pick up. http://www.amazon.com/Programming-Ob.../dp/0672325861 Quote:
|
Yeah, I found applescript very confusing when I tried it and with automator I didn't really see the point. My Dad has known C, C++ for years and is learning C# and he knows UNIX inside and out. My sister got her MCSD(microsft certified software developer) when she was 20 and she knows like 7 different languages. I think I'll have a lot of support. I'm going to try making simple stuff at first but eventually I want to make a Finale(finale is like photoshop for musicians) competitor becuase I hate that program.
|
AppleScript is very useful for making workflows with existing applications. I use it at work for all sorts of things. But if you want to learn how to program, I can't say I recommend it.
|
Agreed, Apple Script is slow, its dictionary is confusing and it burns an unusual amount of CPU. It only works on Macs so it limited in its use.
As far as scripting languages go, I prefer python because it can reach across many platforms and is superior in many ways to AppleScript |
I'm trying to learn Java. It's actually easy. Sort of.
|
i thought applescript was extremly easy.
an easy way to start understanding the basics of programing, all concepts can easily be used in a understanding of a C language. Its just like starting out with javascript like 6502 said. |
Language
I know that this is similar to the other thread by SLH06 but anyway...
I want to learn a easy Mac language, something that i can learn by my self,preferably with free online resources-like turtorials or guides or that-sort-of-thing. So does anybody know of anyhing that the above describes? |
What do you mean by "Mac language"? What do you want to accomplish?
|
Quote:
I have merged your new thread into that existing thread. |
Where to Start
SLH06 & Wee Guy:
The best place to start is with C/C++. Most of the modern higher-level languages today have their roots in and model themselves after C. With good reason, too. Dennis Ritchie really nailed it when he created C for programming. It is safe to label C as the "native language" for the Unix operating system. Once you have C under your belt, stepping to the fairly more complex areas of Obj-C and the Cocoa API won't be too much of a stretch. Also, using other languages like PHP, Java, Python, and others will be much easier to play with once you are comfortable writing code in C/C++. Starting with C will also make you a better programmer in the long run. Starting with the "easier" languages might not prepare you for the pickiness of how a computer really works, and will probably result in you being frustrated with programming in the long run. Stay away from the scripting languages until you can write a program that can be compiled to a binary program and do its task without crashing or crashing something else. Scripts are a great way for telling other programs what to do with your program's data, but they don't really show you the structure of down and dirty low-level programming. If you want to program for the web, once you have a little C under your belt, look at PHP. Technically, PHP is a scripting language, in that the text file containing your code is interpreted on the fly by another system. PHP can run on the command line, used as a shell script, or run by Apache to generate a web page. (PHP = "Php Hypertext Preprocessor") While learning PHP for the server-side, you should also learn javascript for the client-side so you can use AJAX techniques. If you are looking more at stand-alone applications that are cross-platform, take a look at Python and Java. I wouldn't describe Java as a "dead language", but I would go so far to say that it is being eclipsed. Python would be the guilty party here. Personally, I would give the edge to Python for programming for computer applications. But Java will allow you to program for small, portable devices as it is used on many smart cellphones. (Learn and judge for yourself) Different languages have different strengths and weaknesses. This is why some languages are better for some applications than others. But in the end, when heavy programming needs to get down to the nitty-gritty, programmers will turn to C/C++. (Though, you could also take a look at the possible future with D.) |
i change my mind
go straight for objective-c cocoa |
Quote:
|
Oops!!! I meant to post it as a new thread!
Quote:
|
Easy Language
When i posted this message as a reply to the thread started by SLH06, i meant to post it as a thread.
I know that this is similar to the other thread by SLH06 but anyway... I want to learn a easy Mac language, something that i can learn by my self,preferably with free online resources-like turtorials or guides or that-sort-of-thing. So does anybody know of anyhing that the above describes? ---When i say "Mac language" what i mean is a language that Mac OS X understands, as opposed to a "PC language"--that being a language that winDOS ;)attempts;) to run.--- |
Quote:
See my response in post #18 of this thread. |
Quote:
See my response in post #18 of this thread. Do not start new threads when one on the same (or similar) topic exists already. I once again merged your new thread into this existing one. Advice relevant to your question has already been posted above in this thread. Take advantage of that advice, ask more detailed questions based on those responses, etc. |
Oops!
Alright then, is C easy? When i say easy, i mean i know nothing about programming (other than a small amount of python-not much though). |
If you are truly starting at `print "Hello, World"` then you should try the modern web-based interpreters like PHP. You will not need to spend time dealing with the user interface as the web browser does that for you, nor will you need to pray over API manuals just to figure out how to get 3 pieces of data from the user.
loops are loops, conditionals are conditionals. Once you have the concepts down the balance is getting the syntax right. C is 'stricter' than things like PHP in that it will bark at you a lot more for relatively unimportant things like trying to add 1 to a string variable. Purists might say that makes you learn better techniques from the beginning, but it also makes the learning curve steeper. |
WeeGuy, C is actually a lot easier to learn than you think. What gets complicated is just what you can do with it!
The tools to create a program can seem overwhelming. I must admit that I get a little overwhelmed by XCode and what it can do. It was created to be an environment that professionals would want to use. So while it might seem to be more than you are ready for, it is as worthwhile to learn about XCode and what it can do for you as it is to learn C itself. That being said, all you really need is a text editor and a compiler. My first 'Hello World' program on a Mac I wrote in TextEdit. The next program I wrote pinged several different computers listed in a text file as a way to see if they were online. I wrote that on a Windows PC using a program called "TextPad". From there, I've done a large majority of my program code writing using "VI" (actually, "VIM" with syntax highlighting enabled) from the command line. I do like using XCode, because I like the syntax highlighting and the ease of editing in that program. The downside is, most of my programming is in PHP, and XCode doesn't have the resources available to deal with PHP very efficiently. But when writing C/C++/Obj-C, XCode really shines for me! I entered "Learn C" and "Learn C++" into Google, and received good returns. Just picking a link quickly, I found I liked the C++ Language Tutorial by Juan Soulie. While his web site may not be the best design to look at, I liked how he had his tutorial outlined, and it seems easy enough to read. He also aims his tutorial at people who are beginners with little or no prior experience programming. PHP is quite easy to learn, and it borrows much of its syntax from C, Java, and Python. Acme is right, in that PHP will take care of a lot of the sniggling details that stop a C program. You also get the instant gratification of having decent looking output, because you can call and run your programs from a web browser. (Note: it helps to know HTML and CSS so you can "pretty up" your output.) That, and you don't have to try and figure out what libraries you will need to make special calls such as outputting your data to a nice window in the GUI. I recommend C/C++ first because in the long run, I think you will be better served starting with C to learn programming. You will learn better habits with your programming and be more cognizant of how to manipulate the machine and why some things work when other things won't. You will also get a better appreciation and understanding for just how your computer really works and how to leverage that for your own uses. For the record: the vast majority of my programming is done in PHP, due to the nature of what I do. I have written many web programs for displaying databased information in web sites, as well as present PowerPoint© slide shows, and an automatic questionnaire generator. On the system side, I created a PHP script that watches for unauthorized computers being plugged into a secure network, and sends an alert about it. I admit, I am astonished at times by what I've been able to pull off with PHP. But what I've created could be done more efficiently on system resources if I convert them to C and run as a stand-alone binary applications. |
I taught myself to program at a young age. What I found was that it takes a while to get to things that will make non-programmers say, "Ooooh! Shiny!" I recommend starting out with someone console-based.
I found C++ was very, very easy to teach myself the basics of. The syntax is fairly straight-forward for the basic stuff, and grows in complexity with the complexity of what you're trying to do. Something else I found is that I was going, "Ooooh! Shiny!" over things like learning how to use vectors, linked lists, and other neat things that non-programmers would say, "big deal, it says, '1, 2, 4, 8, 16, 32' on the screen." Things that are cool under the hood may have an outwardly lame appearance, but if you learned something new getting 1, 2, 4, and friends to show up on the screen, well, that's pretty awesome. Good luck = ) |
So i will probably use Textedit or NeoOffice for the text editor but i don't know where i can get a free C++ compiler. Does Xcode have a compiler?
|
People pay for a c compiler? Comes with Developer Tools.
|
Quote:
And it compiles your code. It can also test your code and help you find mistakes, etc. It makes it easier to work with the libraries you might need, organize what you are doing. For simple programs, it's overkill. But as you progress, it will be a Godsend. Oh, and XCode is free. |
if xcode is free like newbish says, and you dont have the files you need, im sure someone has put it up
data travels http://www.google.com/search?client=...UTF-8&oe=UTF-8 |
Xcode comes on the Tiger DVD (as an optional install).
It is also available as a free download from Apple's Developers site. The Xcode Tools include an IDE (GUI for program development) as well as installs of the Gnu compilers and associated files and the Java development environment. |
Enough already, start programming! How much debate is necessary begin you begin?
|
| All times are GMT -5. The time now is 05:47 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.