The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   OS X Developer (http://hintsforums.macworld.com/forumdisplay.php?f=27)
-   -   Newbie who wants to program. What language do I learn? (http://hintsforums.macworld.com/showthread.php?t=66972)

Gnarlodious 02-01-2007 06:09 PM

Quote:

interest in web design.
In that case you should take a close look at Python.

Wee_Guy 02-02-2007 01:55 PM

Oops!!! I meant to post it as a new thread!

Quote:

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?

Wee_Guy 02-02-2007 02:01 PM

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.---

hayne 02-02-2007 06:07 PM

Quote:

Originally Posted by Wee_Guy (Post 354401)
Oops!!! I meant to post it as a new thread!

You did post it as a new thread - but that was wrong.
See my response in post #18 of this thread.

hayne 02-02-2007 06:11 PM

Quote:

Originally Posted by Wee_Guy (Post 354402)
I know that this is similar to the other thread by SLH06 but anyway...

The "anyway..." is where you made your mistake.
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.

Wee_Guy 02-03-2007 03:20 AM

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).

acme.mail.order 02-03-2007 06:32 AM

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.

Newbish 02-03-2007 09:16 AM

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.

mysterd429 02-03-2007 02:40 PM

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 = )

Wee_Guy 02-04-2007 04:49 AM

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?

acme.mail.order 02-04-2007 06:23 AM

People pay for a c compiler? Comes with Developer Tools.

Newbish 02-05-2007 07:38 PM

Quote:

Originally Posted by Wee_Guy (Post 354834)
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?

XCode is free.

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.

davidw 02-05-2007 08:58 PM

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

hayne 02-05-2007 10:27 PM

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.

roncross@cox.net 02-05-2007 11:00 PM

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.